r3921 - developers/sameo/patches/ar6k-atheros-2.0/2.6.24
sameo at sita.openmoko.org
sameo at sita.openmoko.org
Tue Jan 22 17:28:10 CET 2008
Author: sameo
Date: 2008-01-22 17:28:04 +0100 (Tue, 22 Jan 2008)
New Revision: 3921
Modified:
developers/sameo/patches/ar6k-atheros-2.0/2.6.24/atheros_2_0_function.patch
developers/sameo/patches/ar6k-atheros-2.0/2.6.24/atheros_2_0_sdio_stack.patch
Log:
ar6k-atheros-2.0: 2.6.24 patches update.
This fixes the iperf bug on 2.6.24.
Modified: developers/sameo/patches/ar6k-atheros-2.0/2.6.24/atheros_2_0_function.patch
===================================================================
--- developers/sameo/patches/ar6k-atheros-2.0/2.6.24/atheros_2_0_function.patch 2008-01-22 15:34:08 UTC (rev 3920)
+++ developers/sameo/patches/ar6k-atheros-2.0/2.6.24/atheros_2_0_function.patch 2008-01-22 16:28:04 UTC (rev 3921)
@@ -85,10 +85,10 @@
drivers/sdio/function/wlan/ar6000/wmi/wmi_host.h | 71
84 files changed, 32510 insertions(+)
-Index: linux-2.6-openmoko/drivers/sdio/function/Kconfig
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/Kconfig
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/Kconfig 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/Kconfig 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,11 @@
+#menu "SDIO function drivers"
+
@@ -102,17 +102,70 @@
+
+#endmenu
\ No newline at end of file
-Index: linux-2.6-openmoko/drivers/sdio/function/Makefile
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/Makefile 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/Makefile 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1 @@
+obj-$(CONFIG_SDIO_AR6000_WLAN) += wlan/
\ No newline at end of file
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c 2008-01-14 13:12:34.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/Makefile 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,4 @@
++#
++# SDIO wlan ar600 card function driver
++#
++obj-$(CONFIG_SDIO_AR6000_WLAN) += ar6000/
+\ No newline at end of file
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/Makefile 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,38 @@
++REV ?= 2
++
++PWD := $(shell pwd)
++
++EXTRA_CFLAGS += -I$(src)/include
++
++EXTRA_CFLAGS += -DLINUX -DDEBUG -D__KERNEL__ -DHTC_RAW_INTERFACE\
++ -DTCMD -DSEND_EVENT_TO_APP -DUSER_KEYS \
++ -DNO_SYNC_FLUSH #\
++ -DMULTIPLE_FRAMES_PER_INTERRUPT -DAR6000REV$(REV) \
++ -DBLOCK_TX_PATH_FLAG \
++ -DSDIO \
++
++EXTRA_CFLAGS += -DKERNEL_2_6
++
++obj-$(CONFIG_SDIO_AR6000_WLAN) += ar6000.o
++
++ar6000-objs += htc/ar6k.o \
++ htc/ar6k_events.o \
++ htc/htc_send.o \
++ htc/htc_recv.o \
++ htc/htc_services.o \
++ htc/htc.o \
++ hif/hif.o \
++ bmi/bmi.o \
++ ar6000/ar6000_drv.o \
++ ar6000/ar6000_raw_if.o \
++ ar6000/netbuf.o \
++ ar6000/wireless_ext.o \
++ ar6000/ioctl.o \
++ miscdrv/common_drv.o \
++ miscdrv/credit_dist.o \
++ wmi/wmi.o \
++ wlan/wlan_node.o \
++ wlan/wlan_recv_beacon.o \
++ wlan/wlan_utils.o
++
++
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,3069 @@
+/*
+ *
@@ -3183,10 +3236,10 @@
+ A_UINT32 targReplyArg)
+{
+}
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,361 @@
+/*
+ *
@@ -3549,10 +3602,10 @@
+#endif
+
+#endif /* _AR6000_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_raw_if.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_raw_if.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_raw_if.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_raw_if.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,439 @@
+/*
+ *
@@ -3993,10 +4046,10 @@
+ return length;
+}
+#endif /* HTC_RAW_INTERFACE */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6xapi_linux.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6xapi_linux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6xapi_linux.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ar6xapi_linux.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,128 @@
+#ifndef _AR6XAPI_LINUX_H
+#define _AR6XAPI_LINUX_H
@@ -4126,10 +4179,10 @@
+#endif
+
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/athdrv_linux.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/athdrv_linux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/athdrv_linux.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/athdrv_linux.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,993 @@
+/*
+ * Copyright (c) 2004-2006 Atheros Communications Inc.
@@ -5124,10 +5177,10 @@
+}
+#endif
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/athtypes_linux.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/athtypes_linux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/athtypes_linux.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/athtypes_linux.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,47 @@
+/*
+ * $Id: //depot/sw/releases/olca2.0-GPL/host/os/linux/include/athtypes_linux.h#1 $
@@ -5176,10 +5229,10 @@
+
+
+#endif /* _ATHTYPES_LINUX_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/config_linux.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/config_linux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/config_linux.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/config_linux.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -5225,10 +5278,10 @@
+#endif
+
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/debug_linux.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2004-2006 Atheros Communications Inc.
@@ -5316,10 +5369,10 @@
+#endif
+
+#endif /* _DEBUG_LINUX_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ioctl.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ioctl.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/ioctl.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/ioctl.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,2573 @@
+/*
+ *
@@ -7894,10 +7947,10 @@
+ return ret;
+}
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/netbuf.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/netbuf.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/netbuf.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/netbuf.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,225 @@
+
+/*
@@ -8124,10 +8177,10 @@
+ return A_OK;
+}
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/osapi_linux.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/osapi_linux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/osapi_linux.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/osapi_linux.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,319 @@
+/*
+ * $Id: //depot/sw/releases/olca2.0-GPL/host/os/linux/include/osapi_linux.h#1 $
@@ -8448,10 +8501,10 @@
+#endif /* __KERNEL__ */
+
+#endif /* _OSAPI_LINUX_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,1866 @@
+/*
+ *
@@ -10319,10 +10372,10 @@
+#endif /* __ATH_CENTRAL_IOCTL_DISPATCHER___ */
+
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/bmi/bmi.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/bmi/bmi.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/bmi/bmi.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/bmi/bmi.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,657 @@
+/*
+ * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -10981,10 +11034,10 @@
+
+ return status;
+}
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/bmi/bmi_internal.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/bmi/bmi_internal.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/bmi/bmi_internal.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/bmi/bmi_internal.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,45 @@
+#ifndef BMI_INTERNAL_H
+#define BMI_INTERNAL_H
@@ -11031,10 +11084,10 @@
+ A_UINT32 length);
+
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/hif/hif.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/hif/hif.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/hif/hif.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/hif/hif.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,818 @@
+/*
+ * @file: hif.c
@@ -11854,10 +11907,10 @@
+
+ return;
+}
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/hif/hif_internal.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/hif/hif_internal.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/hif/hif_internal.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/hif/hif_internal.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,102 @@
+/*
+ * @file: hif_internal.h
@@ -11961,10 +12014,10 @@
+
+void
+delHifDevice(SDDEVICE *handle);
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/ar6k.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/ar6k.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/ar6k.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/ar6k.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,991 @@
+/*
+ * AR6K device layer that handles register level I/O
@@ -12957,10 +13010,206 @@
+
+
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/ar6k_events.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/ar6k.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/ar6k_events.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/ar6k.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,191 @@
++/*
++ *
++ * Copyright (c) 2007 Atheros Communications Inc.
++ * All rights reserved.
++ *
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation;
++ *
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ *
++ *
++ *
++ */
++
++#ifndef AR6K_H_
++#define AR6K_H_
++
++#define AR6K_MAILBOXES 4
++
++/* HTC runs over mailbox 0 */
++#define HTC_MAILBOX 0
++
++#define AR6K_TARGET_DEBUG_INTR_MASK 0x01
++
++#define OTHER_INTS_ENABLED (INT_STATUS_ENABLE_ERROR_MASK | \
++ INT_STATUS_ENABLE_CPU_MASK | \
++ INT_STATUS_ENABLE_COUNTER_MASK)
++
++//#define MBOXHW_UNIT_TEST 1
++
++#include "athstartpack.h"
++typedef PREPACK struct _AR6K_IRQ_PROC_REGISTERS {
++ A_UINT8 host_int_status;
++ A_UINT8 cpu_int_status;
++ A_UINT8 error_int_status;
++ A_UINT8 counter_int_status;
++ A_UINT8 mbox_frame;
++ A_UINT8 rx_lookahead_valid;
++ A_UINT8 hole[2];
++ A_UINT32 rx_lookahead[2];
++} POSTPACK AR6K_IRQ_PROC_REGISTERS;
++
++#define AR6K_IRQ_PROC_REGS_SIZE sizeof(AR6K_IRQ_PROC_REGISTERS)
++
++
++
++typedef PREPACK struct _AR6K_IRQ_ENABLE_REGISTERS {
++ A_UINT8 int_status_enable;
++ A_UINT8 cpu_int_status_enable;
++ A_UINT8 error_status_enable;
++ A_UINT8 counter_int_status_enable;
++} POSTPACK AR6K_IRQ_ENABLE_REGISTERS;
++
++#include "athendpack.h"
++
++#define AR6K_IRQ_ENABLE_REGS_SIZE sizeof(AR6K_IRQ_ENABLE_REGISTERS)
++
++#define AR6K_REG_IO_BUFFER_SIZE 32
++#define AR6K_MAX_REG_IO_BUFFERS 8
++
++/* buffers for ASYNC I/O */
++typedef struct AR6K_ASYNC_REG_IO_BUFFER {
++ HTC_PACKET HtcPacket; /* we use an HTC packet as a wrapper for our async register-based I/O */
++ A_UINT8 Buffer[AR6K_REG_IO_BUFFER_SIZE];
++} AR6K_ASYNC_REG_IO_BUFFER;
++
++typedef struct _AR6K_DEVICE {
++ A_MUTEX_T Lock;
++ AR6K_IRQ_PROC_REGISTERS IrqProcRegisters;
++ AR6K_IRQ_ENABLE_REGISTERS IrqEnableRegisters;
++ void *HIFDevice;
++ A_UINT32 BlockSize;
++ A_UINT32 BlockMask;
++ A_UINT32 MailboxAddress;
++ HIF_PENDING_EVENTS_FUNC GetPendingEventsFunc;
++ void *HTCContext;
++ HTC_PACKET_QUEUE RegisterIOList;
++ AR6K_ASYNC_REG_IO_BUFFER RegIOBuffers[AR6K_MAX_REG_IO_BUFFERS];
++ void (*TargetFailureCallback)(void *Context);
++ A_STATUS (*MessagePendingCallback)(void *Context, A_UINT32 LookAhead, A_BOOL *pAsyncProc);
++ HIF_DEVICE_IRQ_PROCESSING_MODE HifIRQProcessingMode;
++ HIF_MASK_UNMASK_RECV_EVENT HifMaskUmaskRecvEvent;
++} AR6K_DEVICE;
++
++#define IS_DEV_IRQ_PROCESSING_ASYNC_ALLOWED(pDev) ((pDev)->HifIRQProcessingMode != HIF_DEVICE_IRQ_SYNC_ONLY)
++
++A_STATUS DevSetup(AR6K_DEVICE *pDev);
++A_STATUS DevUnmaskInterrupts(AR6K_DEVICE *pDev);
++A_STATUS DevMaskInterrupts(AR6K_DEVICE *pDev);
++A_STATUS DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
++ A_UINT32 *pLookAhead,
++ int TimeoutMS);
++A_STATUS DevRWCompletionHandler(void *context, A_STATUS status);
++A_STATUS DevDsrHandler(void *context);
++A_STATUS DevCheckPendingRecvMsgsAsync(void *context);
++void DevDumpRegisters(AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs,
++ AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs);
++
++#define DEV_STOP_RECV_ASYNC TRUE
++#define DEV_STOP_RECV_SYNC FALSE
++#define DEV_ENABLE_RECV_ASYNC TRUE
++#define DEV_ENABLE_RECV_SYNC FALSE
++A_STATUS DevStopRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode);
++A_STATUS DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode);
++
++static INLINE A_STATUS DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 SendLength) {
++ A_UINT32 paddedLength;
++ A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
++ A_STATUS status;
++
++ /* adjust the length to be a multiple of block size if appropriate */
++ paddedLength = (SendLength + (pDev->BlockMask)) &
++ (~(pDev->BlockMask));
++#if 0 // BufferLength may not be set in , fix this...
++ if (paddedLength > pPacket->BufferLength) {
++ AR_DEBUG_ASSERT(FALSE);
++ if (pPacket->Completion != NULL) {
++ COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
++ }
++ return A_EINVAL;
++ }
++#endif
++ AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
++ ("DevSendPacket, Padded Length: %d Mbox:0x%X (mode:%s)\n",
++ paddedLength,
++ pDev->MailboxAddress,
++ sync ? "SYNC" : "ASYNC"));
++
++ status = HIFReadWrite(pDev->HIFDevice,
++ pDev->MailboxAddress,
++ pPacket->pBuffer,
++ paddedLength, /* the padded length */
++ sync ? HIF_WR_SYNC_BLOCK_INC : HIF_WR_ASYNC_BLOCK_INC,
++ sync ? NULL : pPacket); /* pass the packet as the context to the HIF request */
++
++ if (sync) {
++ pPacket->Status = status;
++ }
++
++ return status;
++}
++
++static INLINE A_STATUS DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 RecvLength) {
++ A_UINT32 paddedLength;
++ A_STATUS status;
++ A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
++
++ /* adjust the length to be a multiple of block size if appropriate */
++ paddedLength = (RecvLength + (pDev->BlockMask)) &
++ (~(pDev->BlockMask));
++ if (paddedLength > pPacket->BufferLength) {
++ AR_DEBUG_ASSERT(FALSE);
++ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
++ ("DevRecvPacket, Not enough space for padlen:%d recvlen:%d bufferlen:%d \n",
++ paddedLength,RecvLength,pPacket->BufferLength));
++ if (pPacket->Completion != NULL) {
++ COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
++ }
++ return A_EINVAL;
++ }
++
++ AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
++ ("DevRecvPacket, Padded Length: %d Mbox:0x%X (mode:%s)\n",
++ paddedLength,
++ pDev->MailboxAddress,
++ sync ? "SYNC" : "ASYNC"));
++
++ status = HIFReadWrite(pDev->HIFDevice,
++ pDev->MailboxAddress,
++ pPacket->pBuffer,
++ paddedLength,
++ sync ? HIF_RD_SYNC_BLOCK_INC : HIF_RD_ASYNC_BLOCK_INC,
++ sync ? NULL : pPacket); /* pass the packet as the context to the HIF request */
++
++ if (sync) {
++ pPacket->Status = status;
++ }
++
++ return status;
++}
++
++#ifdef MBOXHW_UNIT_TEST
++A_STATUS DoMboxHWTest(AR6K_DEVICE *pDev);
++#endif
++
++#endif /*AR6K_H_*/
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/ar6k_events.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/ar6k_events.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,638 @@
+/*
+ * AR6K Driver layer event handling (i.e. interrupts, message polling)
@@ -13600,206 +13849,10 @@
+}
+
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/ar6k.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/ar6k.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,191 @@
-+/*
-+ *
-+ * Copyright (c) 2007 Atheros Communications Inc.
-+ * All rights reserved.
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * Software distributed under the License is distributed on an "AS
-+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+ * implied. See the License for the specific language governing
-+ * rights and limitations under the License.
-+ *
-+ *
-+ *
-+ */
-+
-+#ifndef AR6K_H_
-+#define AR6K_H_
-+
-+#define AR6K_MAILBOXES 4
-+
-+/* HTC runs over mailbox 0 */
-+#define HTC_MAILBOX 0
-+
-+#define AR6K_TARGET_DEBUG_INTR_MASK 0x01
-+
-+#define OTHER_INTS_ENABLED (INT_STATUS_ENABLE_ERROR_MASK | \
-+ INT_STATUS_ENABLE_CPU_MASK | \
-+ INT_STATUS_ENABLE_COUNTER_MASK)
-+
-+//#define MBOXHW_UNIT_TEST 1
-+
-+#include "athstartpack.h"
-+typedef PREPACK struct _AR6K_IRQ_PROC_REGISTERS {
-+ A_UINT8 host_int_status;
-+ A_UINT8 cpu_int_status;
-+ A_UINT8 error_int_status;
-+ A_UINT8 counter_int_status;
-+ A_UINT8 mbox_frame;
-+ A_UINT8 rx_lookahead_valid;
-+ A_UINT8 hole[2];
-+ A_UINT32 rx_lookahead[2];
-+} POSTPACK AR6K_IRQ_PROC_REGISTERS;
-+
-+#define AR6K_IRQ_PROC_REGS_SIZE sizeof(AR6K_IRQ_PROC_REGISTERS)
-+
-+
-+
-+typedef PREPACK struct _AR6K_IRQ_ENABLE_REGISTERS {
-+ A_UINT8 int_status_enable;
-+ A_UINT8 cpu_int_status_enable;
-+ A_UINT8 error_status_enable;
-+ A_UINT8 counter_int_status_enable;
-+} POSTPACK AR6K_IRQ_ENABLE_REGISTERS;
-+
-+#include "athendpack.h"
-+
-+#define AR6K_IRQ_ENABLE_REGS_SIZE sizeof(AR6K_IRQ_ENABLE_REGISTERS)
-+
-+#define AR6K_REG_IO_BUFFER_SIZE 32
-+#define AR6K_MAX_REG_IO_BUFFERS 8
-+
-+/* buffers for ASYNC I/O */
-+typedef struct AR6K_ASYNC_REG_IO_BUFFER {
-+ HTC_PACKET HtcPacket; /* we use an HTC packet as a wrapper for our async register-based I/O */
-+ A_UINT8 Buffer[AR6K_REG_IO_BUFFER_SIZE];
-+} AR6K_ASYNC_REG_IO_BUFFER;
-+
-+typedef struct _AR6K_DEVICE {
-+ A_MUTEX_T Lock;
-+ AR6K_IRQ_PROC_REGISTERS IrqProcRegisters;
-+ AR6K_IRQ_ENABLE_REGISTERS IrqEnableRegisters;
-+ void *HIFDevice;
-+ A_UINT32 BlockSize;
-+ A_UINT32 BlockMask;
-+ A_UINT32 MailboxAddress;
-+ HIF_PENDING_EVENTS_FUNC GetPendingEventsFunc;
-+ void *HTCContext;
-+ HTC_PACKET_QUEUE RegisterIOList;
-+ AR6K_ASYNC_REG_IO_BUFFER RegIOBuffers[AR6K_MAX_REG_IO_BUFFERS];
-+ void (*TargetFailureCallback)(void *Context);
-+ A_STATUS (*MessagePendingCallback)(void *Context, A_UINT32 LookAhead, A_BOOL *pAsyncProc);
-+ HIF_DEVICE_IRQ_PROCESSING_MODE HifIRQProcessingMode;
-+ HIF_MASK_UNMASK_RECV_EVENT HifMaskUmaskRecvEvent;
-+} AR6K_DEVICE;
-+
-+#define IS_DEV_IRQ_PROCESSING_ASYNC_ALLOWED(pDev) ((pDev)->HifIRQProcessingMode != HIF_DEVICE_IRQ_SYNC_ONLY)
-+
-+A_STATUS DevSetup(AR6K_DEVICE *pDev);
-+A_STATUS DevUnmaskInterrupts(AR6K_DEVICE *pDev);
-+A_STATUS DevMaskInterrupts(AR6K_DEVICE *pDev);
-+A_STATUS DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
-+ A_UINT32 *pLookAhead,
-+ int TimeoutMS);
-+A_STATUS DevRWCompletionHandler(void *context, A_STATUS status);
-+A_STATUS DevDsrHandler(void *context);
-+A_STATUS DevCheckPendingRecvMsgsAsync(void *context);
-+void DevDumpRegisters(AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs,
-+ AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs);
-+
-+#define DEV_STOP_RECV_ASYNC TRUE
-+#define DEV_STOP_RECV_SYNC FALSE
-+#define DEV_ENABLE_RECV_ASYNC TRUE
-+#define DEV_ENABLE_RECV_SYNC FALSE
-+A_STATUS DevStopRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode);
-+A_STATUS DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode);
-+
-+static INLINE A_STATUS DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 SendLength) {
-+ A_UINT32 paddedLength;
-+ A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
-+ A_STATUS status;
-+
-+ /* adjust the length to be a multiple of block size if appropriate */
-+ paddedLength = (SendLength + (pDev->BlockMask)) &
-+ (~(pDev->BlockMask));
-+#if 0 // BufferLength may not be set in , fix this...
-+ if (paddedLength > pPacket->BufferLength) {
-+ AR_DEBUG_ASSERT(FALSE);
-+ if (pPacket->Completion != NULL) {
-+ COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
-+ }
-+ return A_EINVAL;
-+ }
-+#endif
-+ AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
-+ ("DevSendPacket, Padded Length: %d Mbox:0x%X (mode:%s)\n",
-+ paddedLength,
-+ pDev->MailboxAddress,
-+ sync ? "SYNC" : "ASYNC"));
-+
-+ status = HIFReadWrite(pDev->HIFDevice,
-+ pDev->MailboxAddress,
-+ pPacket->pBuffer,
-+ paddedLength, /* the padded length */
-+ sync ? HIF_WR_SYNC_BLOCK_INC : HIF_WR_ASYNC_BLOCK_INC,
-+ sync ? NULL : pPacket); /* pass the packet as the context to the HIF request */
-+
-+ if (sync) {
-+ pPacket->Status = status;
-+ }
-+
-+ return status;
-+}
-+
-+static INLINE A_STATUS DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 RecvLength) {
-+ A_UINT32 paddedLength;
-+ A_STATUS status;
-+ A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
-+
-+ /* adjust the length to be a multiple of block size if appropriate */
-+ paddedLength = (RecvLength + (pDev->BlockMask)) &
-+ (~(pDev->BlockMask));
-+ if (paddedLength > pPacket->BufferLength) {
-+ AR_DEBUG_ASSERT(FALSE);
-+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
-+ ("DevRecvPacket, Not enough space for padlen:%d recvlen:%d bufferlen:%d \n",
-+ paddedLength,RecvLength,pPacket->BufferLength));
-+ if (pPacket->Completion != NULL) {
-+ COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
-+ }
-+ return A_EINVAL;
-+ }
-+
-+ AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
-+ ("DevRecvPacket, Padded Length: %d Mbox:0x%X (mode:%s)\n",
-+ paddedLength,
-+ pDev->MailboxAddress,
-+ sync ? "SYNC" : "ASYNC"));
-+
-+ status = HIFReadWrite(pDev->HIFDevice,
-+ pDev->MailboxAddress,
-+ pPacket->pBuffer,
-+ paddedLength,
-+ sync ? HIF_RD_SYNC_BLOCK_INC : HIF_RD_ASYNC_BLOCK_INC,
-+ sync ? NULL : pPacket); /* pass the packet as the context to the HIF request */
-+
-+ if (sync) {
-+ pPacket->Status = status;
-+ }
-+
-+ return status;
-+}
-+
-+#ifdef MBOXHW_UNIT_TEST
-+A_STATUS DoMboxHWTest(AR6K_DEVICE *pDev);
-+#endif
-+
-+#endif /*AR6K_H_*/
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,507 @@
+/*
+ *
@@ -14308,10 +14361,10 @@
+ return FALSE;
+#endif
+}
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_debug.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_debug.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_debug.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_debug.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,65 @@
+#ifndef HTC_DEBUG_H_
+#define HTC_DEBUG_H_
@@ -14378,10 +14431,10 @@
+void DebugDumpBytes(A_UCHAR *buffer, A_UINT16 length, char *pDescription);
+
+#endif /*HTC_DEBUG_H_*/
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_internal.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_internal.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_internal.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_internal.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,168 @@
+/*
+ *
@@ -14551,10 +14604,10 @@
+#endif
+
+#endif /* _HTC_INTERNAL_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_recv.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_recv.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_recv.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_recv.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,703 @@
+/*
+ *
@@ -15259,10 +15312,10 @@
+}
+
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_send.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_send.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_send.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_send.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,541 @@
+/*
+ *
@@ -15805,10 +15858,10 @@
+ UNLOCK_HTC_TX(target);
+
+}
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_services.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_services.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/htc/htc_services.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/htc/htc_services.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,403 @@
+/*
+ *
@@ -16213,10 +16266,349 @@
+ }
+
+}
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_config.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/AR6001_regdump.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_config.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/AR6001_regdump.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,100 @@
++/*
++ * Copyright (c) 2006 Atheros Communications Inc.
++ * All rights reserved.
++ *
++ * $ATH_LICENSE_HOSTSDK0_C$
++ *
++ */
++
++#ifndef __AR6000_REGDUMP_H__
++#define __AR6000_REGDUMP_H__
++
++#if !defined(__ASSEMBLER__)
++/*
++ * Target CPU state at the time of failure is reflected
++ * in a register dump, which the Host can fetch through
++ * the diagnostic window.
++ */
++
++struct MIPS_exception_frame_s {
++ A_UINT32 pc; /* Program Counter */
++ A_UINT32 at; /* MIPS General Purpose registers */
++ A_UINT32 v0;
++ A_UINT32 v1;
++ A_UINT32 a0;
++ A_UINT32 a1;
++ A_UINT32 a2;
++ A_UINT32 a3;
++ A_UINT32 t0;
++ A_UINT32 t1;
++ A_UINT32 t2;
++ A_UINT32 t3;
++ A_UINT32 t4;
++ A_UINT32 t5;
++ A_UINT32 t6;
++ A_UINT32 t7;
++ A_UINT32 s0;
++ A_UINT32 s1;
++ A_UINT32 s2;
++ A_UINT32 s3;
++ A_UINT32 s4;
++ A_UINT32 s5;
++ A_UINT32 s6;
++ A_UINT32 s7;
++ A_UINT32 t8;
++ A_UINT32 t9;
++ A_UINT32 k0;
++ A_UINT32 k1;
++ A_UINT32 gp;
++ A_UINT32 sp;
++ A_UINT32 s8;
++ A_UINT32 ra;
++ A_UINT32 cause; /* Selected coprocessor regs */
++ A_UINT32 status;
++};
++typedef struct MIPS_exception_frame_s CPU_exception_frame_t;
++
++#endif
++
++/*
++ * Offsets into MIPS_exception_frame structure, for use in assembler code
++ * MUST MATCH C STRUCTURE ABOVE
++ */
++#define RD_pc 0
++#define RD_at 1
++#define RD_v0 2
++#define RD_v1 3
++#define RD_a0 4
++#define RD_a1 5
++#define RD_a2 6
++#define RD_a3 7
++#define RD_t0 8
++#define RD_t1 9
++#define RD_t2 10
++#define RD_t3 11
++#define RD_t4 12
++#define RD_t5 13
++#define RD_t6 14
++#define RD_t7 15
++#define RD_s0 16
++#define RD_s1 17
++#define RD_s2 18
++#define RD_s3 19
++#define RD_s4 20
++#define RD_s5 21
++#define RD_s6 22
++#define RD_s7 23
++#define RD_t8 24
++#define RD_t9 25
++#define RD_k0 26
++#define RD_k1 27
++#define RD_gp 28
++#define RD_sp 29
++#define RD_s8 30
++#define RD_ra 31
++#define RD_cause 32
++#define RD_status 33
++
++#define RD_SIZE (34*4) /* Space for this number of words */
++
++#endif /* __AR6000_REGDUMP_H__ */
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/AR6K_version.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/AR6K_version.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,36 @@
++#define __VER_MAJOR_ 2
++#define __VER_MINOR_ 0
++#define __VER_PATCH_ 0
++
++
++/*
++ * Copyright (c) 2004-2007 Atheros Communications Inc.
++ * All rights reserved.
++ *
++ * $ATH_LICENSE_HOSTSDK0_C$
++ *
++ * The makear6ksdk script (used for release builds) modifies the following line.
++ */
++#define __BUILD_NUMBER_ 18
++
++
++/* Format of the version number. */
++#define VER_MAJOR_BIT_OFFSET 28
++#define VER_MINOR_BIT_OFFSET 24
++#define VER_PATCH_BIT_OFFSET 16
++#define VER_BUILD_NUM_BIT_OFFSET 0
++
++
++/*
++ * The version has the following format:
++ * Bits 28-31: Major version
++ * Bits 24-27: Minor version
++ * Bits 16-23: Patch version
++ * Bits 0-15: Build number (automatically generated during build process )
++ * E.g. Build 1.1.3.7 would be represented as 0x11030007.
++ *
++ * DO NOT split the following macro into multiple lines as this may confuse the build scripts.
++ */
++#define AR6K_SW_VERSION ( ( __VER_MAJOR_ << VER_MAJOR_BIT_OFFSET ) + ( __VER_MINOR_ << VER_MINOR_BIT_OFFSET ) + ( __VER_PATCH_ << VER_PATCH_BIT_OFFSET ) + ( __BUILD_NUMBER_ << VER_BUILD_NUM_BIT_OFFSET ) )
++
++
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/AR6K_version.h.NEW
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/AR6K_version.h.NEW 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,36 @@
++#define __VER_MAJOR_ 2
++#define __VER_MINOR_ 0
++#define __VER_PATCH_ 0
++
++
++/*
++ * Copyright (c) 2004-2007 Atheros Communications Inc.
++ * All rights reserved.
++ *
++ * $ATH_LICENSE_HOSTSDK0_C$
++ *
++ * The makear6ksdk script (used for release builds) modifies the following line.
++ */
++#define __BUILD_NUMBER_ 18
++
++
++/* Format of the version number. */
++#define VER_MAJOR_BIT_OFFSET 28
++#define VER_MINOR_BIT_OFFSET 24
++#define VER_PATCH_BIT_OFFSET 16
++#define VER_BUILD_NUM_BIT_OFFSET 0
++
++
++/*
++ * The version has the following format:
++ * Bits 28-31: Major version
++ * Bits 24-27: Minor version
++ * Bits 16-23: Patch version
++ * Bits 0-15: Build number (automatically generated during build process )
++ * E.g. Build 1.1.3.7 would be represented as 0x11030007.
++ *
++ * DO NOT split the following macro into multiple lines as this may confuse the build scripts.
++ */
++#define AR6K_SW_VERSION ( ( __VER_MAJOR_ << VER_MAJOR_BIT_OFFSET ) + ( __VER_MINOR_ << VER_MINOR_BIT_OFFSET ) + ( __VER_PATCH_ << VER_PATCH_BIT_OFFSET ) + ( __BUILD_NUMBER_ << VER_BUILD_NUM_BIT_OFFSET ) )
++
++
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/AR6Khwreg.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/AR6Khwreg.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,147 @@
++/*
++ * Copyright (c) 2004-2007 Atheros Communications Inc.
++ * All rights reserved.
++ *
++ * $ATH_LICENSE_HOSTSDK0_C$
++ *
++ * This file contains the definitions for AR6001 registers
++ * that may be directly manipulated by Host software.
++ */
++
++#ifndef __AR6KHWREG_H__
++#define __AR6KHWREG_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/* Host registers */
++#define HOST_INT_STATUS_ADDRESS 0x00000400
++#define CPU_INT_STATUS_ADDRESS 0x00000401
++#define ERROR_INT_STATUS_ADDRESS 0x00000402
++#define INT_STATUS_ENABLE_ADDRESS 0x00000418
++#define CPU_INT_STATUS_ENABLE_ADDRESS 0x00000419
++#define COUNT_ADDRESS 0x00000420
++#define COUNT_DEC_ADDRESS 0x00000440
++#define WINDOW_DATA_ADDRESS 0x00000474
++#define WINDOW_WRITE_ADDR_ADDRESS 0x00000478
++#define WINDOW_READ_ADDR_ADDRESS 0x0000047c
++
++/* Target addresses */
++#define RESET_CONTROL_ADDRESS 0x0c000000
++#define MC_REMAP_VALID_ADDRESS 0x0c004080
++#define MC_REMAP_SIZE_ADDRESS 0x0c004100
++#define MC_REMAP_COMPARE_ADDRESS 0x0c004180
++#define MC_REMAP_TARGET_ADDRESS 0x0c004200
++#define LOCAL_COUNT_ADDRESS 0x0c014080
++#define LOCAL_SCRATCH_ADDRESS 0x0c0140c0
++
++
++#define INT_STATUS_ENABLE_ERROR_MSB 7
++#define INT_STATUS_ENABLE_ERROR_LSB 7
++#define INT_STATUS_ENABLE_ERROR_MASK 0x00000080
++#define INT_STATUS_ENABLE_ERROR_GET(x) (((x) & INT_STATUS_ENABLE_ERROR_MASK) >> INT_STATUS_ENABLE_ERROR_LSB)
++#define INT_STATUS_ENABLE_ERROR_SET(x) (((x) << INT_STATUS_ENABLE_ERROR_LSB) & INT_STATUS_ENABLE_ERROR_MASK)
++
++#define INT_STATUS_ENABLE_CPU_MSB 6
++#define INT_STATUS_ENABLE_CPU_LSB 6
++#define INT_STATUS_ENABLE_CPU_MASK 0x00000040
++#define INT_STATUS_ENABLE_CPU_GET(x) (((x) & INT_STATUS_ENABLE_CPU_MASK) >> INT_STATUS_ENABLE_CPU_LSB)
++#define INT_STATUS_ENABLE_CPU_SET(x) (((x) << INT_STATUS_ENABLE_CPU_LSB) & INT_STATUS_ENABLE_CPU_MASK)
++
++#define INT_STATUS_ENABLE_COUNTER_MSB 4
++#define INT_STATUS_ENABLE_COUNTER_LSB 4
++#define INT_STATUS_ENABLE_COUNTER_MASK 0x00000010
++#define INT_STATUS_ENABLE_COUNTER_GET(x) (((x) & INT_STATUS_ENABLE_COUNTER_MASK) >> INT_STATUS_ENABLE_COUNTER_LSB)
++#define INT_STATUS_ENABLE_COUNTER_SET(x) (((x) << INT_STATUS_ENABLE_COUNTER_LSB) & INT_STATUS_ENABLE_COUNTER_MASK)
++
++#define INT_STATUS_ENABLE_MBOX_DATA_MSB 3
++#define INT_STATUS_ENABLE_MBOX_DATA_LSB 0
++#define INT_STATUS_ENABLE_MBOX_DATA_MASK 0x0000000f
++#define INT_STATUS_ENABLE_MBOX_DATA_GET(x) (((x) & INT_STATUS_ENABLE_MBOX_DATA_MASK) >> INT_STATUS_ENABLE_MBOX_DATA_LSB)
++#define INT_STATUS_ENABLE_MBOX_DATA_SET(x) (((x) << INT_STATUS_ENABLE_MBOX_DATA_LSB) & INT_STATUS_ENABLE_MBOX_DATA_MASK)
++
++#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_MSB 1
++#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB 1
++#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK 0x00000002
++#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_GET(x) (((x) & ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK) >> ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB)
++#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_SET(x) (((x) << ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB) & ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK)
++
++#define ERROR_STATUS_ENABLE_TX_OVERFLOW_MSB 0
++#define ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB 0
++#define ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK 0x00000001
++#define ERROR_STATUS_ENABLE_TX_OVERFLOW_GET(x) (((x) & ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK) >> ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB)
++#define ERROR_STATUS_ENABLE_TX_OVERFLOW_SET(x) (((x) << ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB) & ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK)
++
++
++#define CPU_INT_STATUS_ENABLE_BIT_MSB 7
++#define CPU_INT_STATUS_ENABLE_BIT_LSB 0
++#define CPU_INT_STATUS_ENABLE_BIT_MASK 0x000000ff
++#define CPU_INT_STATUS_ENABLE_BIT_GET(x) (((x) & CPU_INT_STATUS_ENABLE_BIT_MASK) >> CPU_INT_STATUS_ENABLE_BIT_LSB)
++#define CPU_INT_STATUS_ENABLE_BIT_SET(x) (((x) << CPU_INT_STATUS_ENABLE_BIT_LSB) & CPU_INT_STATUS_ENABLE_BIT_MASK)
++
++#define COUNTER_INT_STATUS_ENABLE_BIT_MSB 7
++#define COUNTER_INT_STATUS_ENABLE_BIT_LSB 0
++#define COUNTER_INT_STATUS_ENABLE_BIT_MASK 0x000000ff
++#define COUNTER_INT_STATUS_ENABLE_BIT_GET(x) (((x) & COUNTER_INT_STATUS_ENABLE_BIT_MASK) >> COUNTER_INT_STATUS_ENABLE_BIT_LSB)
++#define COUNTER_INT_STATUS_ENABLE_BIT_SET(x) (((x) << COUNTER_INT_STATUS_ENABLE_BIT_LSB) & COUNTER_INT_STATUS_ENABLE_BIT_MASK)
++
++#define ERROR_INT_STATUS_WAKEUP_MSB 2
++#define ERROR_INT_STATUS_WAKEUP_LSB 2
++#define ERROR_INT_STATUS_WAKEUP_MASK 0x00000004
++#define ERROR_INT_STATUS_WAKEUP_GET(x) (((x) & ERROR_INT_STATUS_WAKEUP_MASK) >> ERROR_INT_STATUS_WAKEUP_LSB)
++#define ERROR_INT_STATUS_WAKEUP_SET(x) (((x) << ERROR_INT_STATUS_WAKEUP_LSB) & ERROR_INT_STATUS_WAKEUP_MASK)
++
++#define ERROR_INT_STATUS_RX_UNDERFLOW_MSB 1
++#define ERROR_INT_STATUS_RX_UNDERFLOW_LSB 1
++#define ERROR_INT_STATUS_RX_UNDERFLOW_MASK 0x00000002
++#define ERROR_INT_STATUS_RX_UNDERFLOW_GET(x) (((x) & ERROR_INT_STATUS_RX_UNDERFLOW_MASK) >> ERROR_INT_STATUS_RX_UNDERFLOW_LSB)
++#define ERROR_INT_STATUS_RX_UNDERFLOW_SET(x) (((x) << ERROR_INT_STATUS_RX_UNDERFLOW_LSB) & ERROR_INT_STATUS_RX_UNDERFLOW_MASK)
++
++#define ERROR_INT_STATUS_TX_OVERFLOW_MSB 0
++#define ERROR_INT_STATUS_TX_OVERFLOW_LSB 0
++#define ERROR_INT_STATUS_TX_OVERFLOW_MASK 0x00000001
++#define ERROR_INT_STATUS_TX_OVERFLOW_GET(x) (((x) & ERROR_INT_STATUS_TX_OVERFLOW_MASK) >> ERROR_INT_STATUS_TX_OVERFLOW_LSB)
++#define ERROR_INT_STATUS_TX_OVERFLOW_SET(x) (((x) << ERROR_INT_STATUS_TX_OVERFLOW_LSB) & ERROR_INT_STATUS_TX_OVERFLOW_MASK)
++
++#define HOST_INT_STATUS_ERROR_MSB 7
++#define HOST_INT_STATUS_ERROR_LSB 7
++#define HOST_INT_STATUS_ERROR_MASK 0x00000080
++#define HOST_INT_STATUS_ERROR_GET(x) (((x) & HOST_INT_STATUS_ERROR_MASK) >> HOST_INT_STATUS_ERROR_LSB)
++#define HOST_INT_STATUS_ERROR_SET(x) (((x) << HOST_INT_STATUS_ERROR_LSB) & HOST_INT_STATUS_ERROR_MASK)
++
++#define HOST_INT_STATUS_CPU_MSB 6
++#define HOST_INT_STATUS_CPU_LSB 6
++#define HOST_INT_STATUS_CPU_MASK 0x00000040
++#define HOST_INT_STATUS_CPU_GET(x) (((x) & HOST_INT_STATUS_CPU_MASK) >> HOST_INT_STATUS_CPU_LSB)
++#define HOST_INT_STATUS_CPU_SET(x) (((x) << HOST_INT_STATUS_CPU_LSB) & HOST_INT_STATUS_CPU_MASK)
++
++#define HOST_INT_STATUS_COUNTER_MSB 4
++#define HOST_INT_STATUS_COUNTER_LSB 4
++#define HOST_INT_STATUS_COUNTER_MASK 0x00000010
++#define HOST_INT_STATUS_COUNTER_GET(x) (((x) & HOST_INT_STATUS_COUNTER_MASK) >> HOST_INT_STATUS_COUNTER_LSB)
++#define HOST_INT_STATUS_COUNTER_SET(x) (((x) << HOST_INT_STATUS_COUNTER_LSB) & HOST_INT_STATUS_COUNTER_MASK)
++
++#define RESET_CONTROL_WARM_RST_MSB 7
++#define RESET_CONTROL_WARM_RST_LSB 7
++#define RESET_CONTROL_WARM_RST_MASK 0x00000080
++#define RESET_CONTROL_WARM_RST_GET(x) (((x) & RESET_CONTROL_WARM_RST_MASK) >> RESET_CONTROL_WARM_RST_LSB)
++#define RESET_CONTROL_WARM_RST_SET(x) (((x) << RESET_CONTROL_WARM_RST_LSB) & RESET_CONTROL_WARM_RST_MASK)
++
++#define RESET_CONTROL_COLD_RST_MSB 8
++#define RESET_CONTROL_COLD_RST_LSB 8
++#define RESET_CONTROL_COLD_RST_MASK 0x00000100
++#define RESET_CONTROL_COLD_RST_GET(x) (((x) & RESET_CONTROL_COLD_RST_MASK) >> RESET_CONTROL_COLD_RST_LSB)
++#define RESET_CONTROL_COLD_RST_SET(x) (((x) << RESET_CONTROL_COLD_RST_LSB) & RESET_CONTROL_COLD_RST_MASK)
++
++#define RESET_CAUSE_LAST_MSB 2
++#define RESET_CAUSE_LAST_LSB 0
++#define RESET_CAUSE_LAST_MASK 0x00000007
++#define RESET_CAUSE_LAST_GET(x) (((x) & RESET_CAUSE_LAST_MASK) >> RESET_CAUSE_LAST_LSB)
++#define RESET_CAUSE_LAST_SET(x) (((x) << RESET_CAUSE_LAST_LSB) & RESET_CAUSE_LAST_MASK)
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* __AR6KHWREG_H__ */
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_config.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_config.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,27 @@
+#ifndef _A_CONFIG_H_
+#define _A_CONFIG_H_
@@ -16245,10 +16637,10 @@
+#include "../ar6000/config_linux.h"
+
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_debug.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_debug.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_debug.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_debug.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,41 @@
+#ifndef _A_DEBUG_H_
+#define _A_DEBUG_H_
@@ -16291,10 +16683,43 @@
+#include "../ar6000/debug_linux.h"
+
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_drv_api.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_drv.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_drv_api.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_drv.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,28 @@
++#ifndef _A_DRV_H_
++#define _A_DRV_H_
++/*
++ * $Id: //depot/sw/releases/olca2.0-GPL/host/include/a_drv.h#1 $
++ *
++ * This file contains the definitions of the basic atheros data types.
++ * It is used to map the data types in atheros files to a platform specific
++ * type.
++ *
++ * Copyright 2003-2005 Atheros Communications, Inc., All Rights Reserved.
++ *
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation;
++ *
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ *
++ *
++ *
++ */
++
++#include "../ar6000/athdrv_linux.h"
++
++#endif /* _ADRV_H_ */
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_drv_api.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_drv_api.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,185 @@
+#ifndef _A_DRV_API_H_
+#define _A_DRV_API_H_
@@ -16481,15 +16906,15 @@
+#endif
+
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_drv.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_osapi.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_drv.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_osapi.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,28 @@
-+#ifndef _A_DRV_H_
-+#define _A_DRV_H_
++#ifndef _A_OSAPI_H_
++#define _A_OSAPI_H_
+/*
-+ * $Id: //depot/sw/releases/olca2.0-GPL/host/include/a_drv.h#1 $
++ * $Id: //depot/sw/releases/olca2.0-GPL/host/include/a_osapi.h#1 $
+ *
+ * This file contains the definitions of the basic atheros data types.
+ * It is used to map the data types in atheros files to a platform specific
@@ -16511,18 +16936,18 @@
+ *
+ */
+
-+#include "../ar6000/athdrv_linux.h"
++#include "../ar6000/osapi_linux.h"
+
-+#endif /* _ADRV_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_osapi.h
++#endif /* _OSAPI_H_ */
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_types.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_osapi.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/a_types.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,28 @@
-+#ifndef _A_OSAPI_H_
-+#define _A_OSAPI_H_
++#ifndef _A_TYPES_H_
++#define _A_TYPES_H_
+/*
-+ * $Id: //depot/sw/releases/olca2.0-GPL/host/include/a_osapi.h#1 $
++ * $Id: //depot/sw/releases/olca2.0-GPL/host/include/a_types.h#1 $
+ *
+ * This file contains the definitions of the basic atheros data types.
+ * It is used to map the data types in atheros files to a platform specific
@@ -16544,13 +16969,13 @@
+ *
+ */
+
-+#include "../ar6000/osapi_linux.h"
++#include "../ar6000/athtypes_linux.h"
+
-+#endif /* _OSAPI_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ar6000_api.h
++#endif /* _ATHTYPES_H_ */
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ar6000_api.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ar6000_api.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ar6000_api.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,29 @@
+#ifndef _AR6000_API_H_
+#define _AR6000_API_H_
@@ -16581,10 +17006,10 @@
+
+#endif /* _AR6000_API_H */
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ar6000_diag.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ar6000_diag.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ar6000_diag.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ar6000_diag.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,38 @@
+/*
+ *
@@ -16624,349 +17049,10 @@
+ A_UCHAR *data, A_UINT32 length);
+
+#endif /*AR6000_DIAG_H_*/
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/AR6001_regdump.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/athdefs.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/AR6001_regdump.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,100 @@
-+/*
-+ * Copyright (c) 2006 Atheros Communications Inc.
-+ * All rights reserved.
-+ *
-+ * $ATH_LICENSE_HOSTSDK0_C$
-+ *
-+ */
-+
-+#ifndef __AR6000_REGDUMP_H__
-+#define __AR6000_REGDUMP_H__
-+
-+#if !defined(__ASSEMBLER__)
-+/*
-+ * Target CPU state at the time of failure is reflected
-+ * in a register dump, which the Host can fetch through
-+ * the diagnostic window.
-+ */
-+
-+struct MIPS_exception_frame_s {
-+ A_UINT32 pc; /* Program Counter */
-+ A_UINT32 at; /* MIPS General Purpose registers */
-+ A_UINT32 v0;
-+ A_UINT32 v1;
-+ A_UINT32 a0;
-+ A_UINT32 a1;
-+ A_UINT32 a2;
-+ A_UINT32 a3;
-+ A_UINT32 t0;
-+ A_UINT32 t1;
-+ A_UINT32 t2;
-+ A_UINT32 t3;
-+ A_UINT32 t4;
-+ A_UINT32 t5;
-+ A_UINT32 t6;
-+ A_UINT32 t7;
-+ A_UINT32 s0;
-+ A_UINT32 s1;
-+ A_UINT32 s2;
-+ A_UINT32 s3;
-+ A_UINT32 s4;
-+ A_UINT32 s5;
-+ A_UINT32 s6;
-+ A_UINT32 s7;
-+ A_UINT32 t8;
-+ A_UINT32 t9;
-+ A_UINT32 k0;
-+ A_UINT32 k1;
-+ A_UINT32 gp;
-+ A_UINT32 sp;
-+ A_UINT32 s8;
-+ A_UINT32 ra;
-+ A_UINT32 cause; /* Selected coprocessor regs */
-+ A_UINT32 status;
-+};
-+typedef struct MIPS_exception_frame_s CPU_exception_frame_t;
-+
-+#endif
-+
-+/*
-+ * Offsets into MIPS_exception_frame structure, for use in assembler code
-+ * MUST MATCH C STRUCTURE ABOVE
-+ */
-+#define RD_pc 0
-+#define RD_at 1
-+#define RD_v0 2
-+#define RD_v1 3
-+#define RD_a0 4
-+#define RD_a1 5
-+#define RD_a2 6
-+#define RD_a3 7
-+#define RD_t0 8
-+#define RD_t1 9
-+#define RD_t2 10
-+#define RD_t3 11
-+#define RD_t4 12
-+#define RD_t5 13
-+#define RD_t6 14
-+#define RD_t7 15
-+#define RD_s0 16
-+#define RD_s1 17
-+#define RD_s2 18
-+#define RD_s3 19
-+#define RD_s4 20
-+#define RD_s5 21
-+#define RD_s6 22
-+#define RD_s7 23
-+#define RD_t8 24
-+#define RD_t9 25
-+#define RD_k0 26
-+#define RD_k1 27
-+#define RD_gp 28
-+#define RD_sp 29
-+#define RD_s8 30
-+#define RD_ra 31
-+#define RD_cause 32
-+#define RD_status 33
-+
-+#define RD_SIZE (34*4) /* Space for this number of words */
-+
-+#endif /* __AR6000_REGDUMP_H__ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/AR6Khwreg.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/AR6Khwreg.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,147 @@
-+/*
-+ * Copyright (c) 2004-2007 Atheros Communications Inc.
-+ * All rights reserved.
-+ *
-+ * $ATH_LICENSE_HOSTSDK0_C$
-+ *
-+ * This file contains the definitions for AR6001 registers
-+ * that may be directly manipulated by Host software.
-+ */
-+
-+#ifndef __AR6KHWREG_H__
-+#define __AR6KHWREG_H__
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/* Host registers */
-+#define HOST_INT_STATUS_ADDRESS 0x00000400
-+#define CPU_INT_STATUS_ADDRESS 0x00000401
-+#define ERROR_INT_STATUS_ADDRESS 0x00000402
-+#define INT_STATUS_ENABLE_ADDRESS 0x00000418
-+#define CPU_INT_STATUS_ENABLE_ADDRESS 0x00000419
-+#define COUNT_ADDRESS 0x00000420
-+#define COUNT_DEC_ADDRESS 0x00000440
-+#define WINDOW_DATA_ADDRESS 0x00000474
-+#define WINDOW_WRITE_ADDR_ADDRESS 0x00000478
-+#define WINDOW_READ_ADDR_ADDRESS 0x0000047c
-+
-+/* Target addresses */
-+#define RESET_CONTROL_ADDRESS 0x0c000000
-+#define MC_REMAP_VALID_ADDRESS 0x0c004080
-+#define MC_REMAP_SIZE_ADDRESS 0x0c004100
-+#define MC_REMAP_COMPARE_ADDRESS 0x0c004180
-+#define MC_REMAP_TARGET_ADDRESS 0x0c004200
-+#define LOCAL_COUNT_ADDRESS 0x0c014080
-+#define LOCAL_SCRATCH_ADDRESS 0x0c0140c0
-+
-+
-+#define INT_STATUS_ENABLE_ERROR_MSB 7
-+#define INT_STATUS_ENABLE_ERROR_LSB 7
-+#define INT_STATUS_ENABLE_ERROR_MASK 0x00000080
-+#define INT_STATUS_ENABLE_ERROR_GET(x) (((x) & INT_STATUS_ENABLE_ERROR_MASK) >> INT_STATUS_ENABLE_ERROR_LSB)
-+#define INT_STATUS_ENABLE_ERROR_SET(x) (((x) << INT_STATUS_ENABLE_ERROR_LSB) & INT_STATUS_ENABLE_ERROR_MASK)
-+
-+#define INT_STATUS_ENABLE_CPU_MSB 6
-+#define INT_STATUS_ENABLE_CPU_LSB 6
-+#define INT_STATUS_ENABLE_CPU_MASK 0x00000040
-+#define INT_STATUS_ENABLE_CPU_GET(x) (((x) & INT_STATUS_ENABLE_CPU_MASK) >> INT_STATUS_ENABLE_CPU_LSB)
-+#define INT_STATUS_ENABLE_CPU_SET(x) (((x) << INT_STATUS_ENABLE_CPU_LSB) & INT_STATUS_ENABLE_CPU_MASK)
-+
-+#define INT_STATUS_ENABLE_COUNTER_MSB 4
-+#define INT_STATUS_ENABLE_COUNTER_LSB 4
-+#define INT_STATUS_ENABLE_COUNTER_MASK 0x00000010
-+#define INT_STATUS_ENABLE_COUNTER_GET(x) (((x) & INT_STATUS_ENABLE_COUNTER_MASK) >> INT_STATUS_ENABLE_COUNTER_LSB)
-+#define INT_STATUS_ENABLE_COUNTER_SET(x) (((x) << INT_STATUS_ENABLE_COUNTER_LSB) & INT_STATUS_ENABLE_COUNTER_MASK)
-+
-+#define INT_STATUS_ENABLE_MBOX_DATA_MSB 3
-+#define INT_STATUS_ENABLE_MBOX_DATA_LSB 0
-+#define INT_STATUS_ENABLE_MBOX_DATA_MASK 0x0000000f
-+#define INT_STATUS_ENABLE_MBOX_DATA_GET(x) (((x) & INT_STATUS_ENABLE_MBOX_DATA_MASK) >> INT_STATUS_ENABLE_MBOX_DATA_LSB)
-+#define INT_STATUS_ENABLE_MBOX_DATA_SET(x) (((x) << INT_STATUS_ENABLE_MBOX_DATA_LSB) & INT_STATUS_ENABLE_MBOX_DATA_MASK)
-+
-+#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_MSB 1
-+#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB 1
-+#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK 0x00000002
-+#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_GET(x) (((x) & ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK) >> ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB)
-+#define ERROR_STATUS_ENABLE_RX_UNDERFLOW_SET(x) (((x) << ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB) & ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK)
-+
-+#define ERROR_STATUS_ENABLE_TX_OVERFLOW_MSB 0
-+#define ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB 0
-+#define ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK 0x00000001
-+#define ERROR_STATUS_ENABLE_TX_OVERFLOW_GET(x) (((x) & ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK) >> ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB)
-+#define ERROR_STATUS_ENABLE_TX_OVERFLOW_SET(x) (((x) << ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB) & ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK)
-+
-+
-+#define CPU_INT_STATUS_ENABLE_BIT_MSB 7
-+#define CPU_INT_STATUS_ENABLE_BIT_LSB 0
-+#define CPU_INT_STATUS_ENABLE_BIT_MASK 0x000000ff
-+#define CPU_INT_STATUS_ENABLE_BIT_GET(x) (((x) & CPU_INT_STATUS_ENABLE_BIT_MASK) >> CPU_INT_STATUS_ENABLE_BIT_LSB)
-+#define CPU_INT_STATUS_ENABLE_BIT_SET(x) (((x) << CPU_INT_STATUS_ENABLE_BIT_LSB) & CPU_INT_STATUS_ENABLE_BIT_MASK)
-+
-+#define COUNTER_INT_STATUS_ENABLE_BIT_MSB 7
-+#define COUNTER_INT_STATUS_ENABLE_BIT_LSB 0
-+#define COUNTER_INT_STATUS_ENABLE_BIT_MASK 0x000000ff
-+#define COUNTER_INT_STATUS_ENABLE_BIT_GET(x) (((x) & COUNTER_INT_STATUS_ENABLE_BIT_MASK) >> COUNTER_INT_STATUS_ENABLE_BIT_LSB)
-+#define COUNTER_INT_STATUS_ENABLE_BIT_SET(x) (((x) << COUNTER_INT_STATUS_ENABLE_BIT_LSB) & COUNTER_INT_STATUS_ENABLE_BIT_MASK)
-+
-+#define ERROR_INT_STATUS_WAKEUP_MSB 2
-+#define ERROR_INT_STATUS_WAKEUP_LSB 2
-+#define ERROR_INT_STATUS_WAKEUP_MASK 0x00000004
-+#define ERROR_INT_STATUS_WAKEUP_GET(x) (((x) & ERROR_INT_STATUS_WAKEUP_MASK) >> ERROR_INT_STATUS_WAKEUP_LSB)
-+#define ERROR_INT_STATUS_WAKEUP_SET(x) (((x) << ERROR_INT_STATUS_WAKEUP_LSB) & ERROR_INT_STATUS_WAKEUP_MASK)
-+
-+#define ERROR_INT_STATUS_RX_UNDERFLOW_MSB 1
-+#define ERROR_INT_STATUS_RX_UNDERFLOW_LSB 1
-+#define ERROR_INT_STATUS_RX_UNDERFLOW_MASK 0x00000002
-+#define ERROR_INT_STATUS_RX_UNDERFLOW_GET(x) (((x) & ERROR_INT_STATUS_RX_UNDERFLOW_MASK) >> ERROR_INT_STATUS_RX_UNDERFLOW_LSB)
-+#define ERROR_INT_STATUS_RX_UNDERFLOW_SET(x) (((x) << ERROR_INT_STATUS_RX_UNDERFLOW_LSB) & ERROR_INT_STATUS_RX_UNDERFLOW_MASK)
-+
-+#define ERROR_INT_STATUS_TX_OVERFLOW_MSB 0
-+#define ERROR_INT_STATUS_TX_OVERFLOW_LSB 0
-+#define ERROR_INT_STATUS_TX_OVERFLOW_MASK 0x00000001
-+#define ERROR_INT_STATUS_TX_OVERFLOW_GET(x) (((x) & ERROR_INT_STATUS_TX_OVERFLOW_MASK) >> ERROR_INT_STATUS_TX_OVERFLOW_LSB)
-+#define ERROR_INT_STATUS_TX_OVERFLOW_SET(x) (((x) << ERROR_INT_STATUS_TX_OVERFLOW_LSB) & ERROR_INT_STATUS_TX_OVERFLOW_MASK)
-+
-+#define HOST_INT_STATUS_ERROR_MSB 7
-+#define HOST_INT_STATUS_ERROR_LSB 7
-+#define HOST_INT_STATUS_ERROR_MASK 0x00000080
-+#define HOST_INT_STATUS_ERROR_GET(x) (((x) & HOST_INT_STATUS_ERROR_MASK) >> HOST_INT_STATUS_ERROR_LSB)
-+#define HOST_INT_STATUS_ERROR_SET(x) (((x) << HOST_INT_STATUS_ERROR_LSB) & HOST_INT_STATUS_ERROR_MASK)
-+
-+#define HOST_INT_STATUS_CPU_MSB 6
-+#define HOST_INT_STATUS_CPU_LSB 6
-+#define HOST_INT_STATUS_CPU_MASK 0x00000040
-+#define HOST_INT_STATUS_CPU_GET(x) (((x) & HOST_INT_STATUS_CPU_MASK) >> HOST_INT_STATUS_CPU_LSB)
-+#define HOST_INT_STATUS_CPU_SET(x) (((x) << HOST_INT_STATUS_CPU_LSB) & HOST_INT_STATUS_CPU_MASK)
-+
-+#define HOST_INT_STATUS_COUNTER_MSB 4
-+#define HOST_INT_STATUS_COUNTER_LSB 4
-+#define HOST_INT_STATUS_COUNTER_MASK 0x00000010
-+#define HOST_INT_STATUS_COUNTER_GET(x) (((x) & HOST_INT_STATUS_COUNTER_MASK) >> HOST_INT_STATUS_COUNTER_LSB)
-+#define HOST_INT_STATUS_COUNTER_SET(x) (((x) << HOST_INT_STATUS_COUNTER_LSB) & HOST_INT_STATUS_COUNTER_MASK)
-+
-+#define RESET_CONTROL_WARM_RST_MSB 7
-+#define RESET_CONTROL_WARM_RST_LSB 7
-+#define RESET_CONTROL_WARM_RST_MASK 0x00000080
-+#define RESET_CONTROL_WARM_RST_GET(x) (((x) & RESET_CONTROL_WARM_RST_MASK) >> RESET_CONTROL_WARM_RST_LSB)
-+#define RESET_CONTROL_WARM_RST_SET(x) (((x) << RESET_CONTROL_WARM_RST_LSB) & RESET_CONTROL_WARM_RST_MASK)
-+
-+#define RESET_CONTROL_COLD_RST_MSB 8
-+#define RESET_CONTROL_COLD_RST_LSB 8
-+#define RESET_CONTROL_COLD_RST_MASK 0x00000100
-+#define RESET_CONTROL_COLD_RST_GET(x) (((x) & RESET_CONTROL_COLD_RST_MASK) >> RESET_CONTROL_COLD_RST_LSB)
-+#define RESET_CONTROL_COLD_RST_SET(x) (((x) << RESET_CONTROL_COLD_RST_LSB) & RESET_CONTROL_COLD_RST_MASK)
-+
-+#define RESET_CAUSE_LAST_MSB 2
-+#define RESET_CAUSE_LAST_LSB 0
-+#define RESET_CAUSE_LAST_MASK 0x00000007
-+#define RESET_CAUSE_LAST_GET(x) (((x) & RESET_CAUSE_LAST_MASK) >> RESET_CAUSE_LAST_LSB)
-+#define RESET_CAUSE_LAST_SET(x) (((x) << RESET_CAUSE_LAST_LSB) & RESET_CAUSE_LAST_MASK)
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* __AR6KHWREG_H__ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/AR6K_version.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/AR6K_version.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,36 @@
-+#define __VER_MAJOR_ 2
-+#define __VER_MINOR_ 0
-+#define __VER_PATCH_ 0
-+
-+
-+/*
-+ * Copyright (c) 2004-2007 Atheros Communications Inc.
-+ * All rights reserved.
-+ *
-+ * $ATH_LICENSE_HOSTSDK0_C$
-+ *
-+ * The makear6ksdk script (used for release builds) modifies the following line.
-+ */
-+#define __BUILD_NUMBER_ 18
-+
-+
-+/* Format of the version number. */
-+#define VER_MAJOR_BIT_OFFSET 28
-+#define VER_MINOR_BIT_OFFSET 24
-+#define VER_PATCH_BIT_OFFSET 16
-+#define VER_BUILD_NUM_BIT_OFFSET 0
-+
-+
-+/*
-+ * The version has the following format:
-+ * Bits 28-31: Major version
-+ * Bits 24-27: Minor version
-+ * Bits 16-23: Patch version
-+ * Bits 0-15: Build number (automatically generated during build process )
-+ * E.g. Build 1.1.3.7 would be represented as 0x11030007.
-+ *
-+ * DO NOT split the following macro into multiple lines as this may confuse the build scripts.
-+ */
-+#define AR6K_SW_VERSION ( ( __VER_MAJOR_ << VER_MAJOR_BIT_OFFSET ) + ( __VER_MINOR_ << VER_MINOR_BIT_OFFSET ) + ( __VER_PATCH_ << VER_PATCH_BIT_OFFSET ) + ( __BUILD_NUMBER_ << VER_BUILD_NUM_BIT_OFFSET ) )
-+
-+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/AR6K_version.h.NEW
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/AR6K_version.h.NEW 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,36 @@
-+#define __VER_MAJOR_ 2
-+#define __VER_MINOR_ 0
-+#define __VER_PATCH_ 0
-+
-+
-+/*
-+ * Copyright (c) 2004-2007 Atheros Communications Inc.
-+ * All rights reserved.
-+ *
-+ * $ATH_LICENSE_HOSTSDK0_C$
-+ *
-+ * The makear6ksdk script (used for release builds) modifies the following line.
-+ */
-+#define __BUILD_NUMBER_ 18
-+
-+
-+/* Format of the version number. */
-+#define VER_MAJOR_BIT_OFFSET 28
-+#define VER_MINOR_BIT_OFFSET 24
-+#define VER_PATCH_BIT_OFFSET 16
-+#define VER_BUILD_NUM_BIT_OFFSET 0
-+
-+
-+/*
-+ * The version has the following format:
-+ * Bits 28-31: Major version
-+ * Bits 24-27: Minor version
-+ * Bits 16-23: Patch version
-+ * Bits 0-15: Build number (automatically generated during build process )
-+ * E.g. Build 1.1.3.7 would be represented as 0x11030007.
-+ *
-+ * DO NOT split the following macro into multiple lines as this may confuse the build scripts.
-+ */
-+#define AR6K_SW_VERSION ( ( __VER_MAJOR_ << VER_MAJOR_BIT_OFFSET ) + ( __VER_MINOR_ << VER_MINOR_BIT_OFFSET ) + ( __VER_PATCH_ << VER_PATCH_BIT_OFFSET ) + ( __BUILD_NUMBER_ << VER_BUILD_NUM_BIT_OFFSET ) )
-+
-+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/athdefs.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/athdefs.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/athdefs.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,85 @@
+#ifndef __ATHDEFS_H__
+#define __ATHDEFS_H__
@@ -17053,10 +17139,10 @@
+}WLAN_CAPABILITY;
+
+#endif /* __ATHDEFS_H__ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/athdrv.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/athdrv.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/athdrv.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/athdrv.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2004-2006 Atheros Communications Inc.
@@ -17090,10 +17176,10 @@
+#endif
+
+#endif /* _ATHDRV_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/athendpack.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/athendpack.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/athendpack.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/athendpack.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,41 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ * @file: athendpack.h
@@ -17136,10 +17222,10 @@
+#include "../os/wince/include/athendpack_wince.h"
+#endif /* WINCE */
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/athstartpack.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/athstartpack.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/athstartpack.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/athstartpack.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,42 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ * @file: athstartpack.h
@@ -17183,43 +17269,10 @@
+#include "../os/wince/include/athstartpack_wince.h"
+#endif /* WINCE */
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_types.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/bmi.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/a_types.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,28 @@
-+#ifndef _A_TYPES_H_
-+#define _A_TYPES_H_
-+/*
-+ * $Id: //depot/sw/releases/olca2.0-GPL/host/include/a_types.h#1 $
-+ *
-+ * This file contains the definitions of the basic atheros data types.
-+ * It is used to map the data types in atheros files to a platform specific
-+ * type.
-+ *
-+ * Copyright 2003-2005 Atheros Communications, Inc., All Rights Reserved.
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * Software distributed under the License is distributed on an "AS
-+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+ * implied. See the License for the specific language governing
-+ * rights and limitations under the License.
-+ *
-+ *
-+ *
-+ */
-+
-+#include "../ar6000/athtypes_linux.h"
-+
-+#endif /* _ATHTYPES_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/bmi.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/bmi.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/bmi.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,100 @@
+#ifndef _BMI_H_
+#define _BMI_H_
@@ -17321,10 +17374,10 @@
+#endif
+
+#endif /* _BMI_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/bmi_msg.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/bmi_msg.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/bmi_msg.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/bmi_msg.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,199 @@
+#ifndef __BMI_MSG_H__
+#define __BMI_MSG_H__
@@ -17525,10 +17578,10 @@
+
+
+#endif /* __BMI_MSG_H__ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/common_drv.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/common_drv.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/common_drv.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/common_drv.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,61 @@
+/*
+ *
@@ -17591,61 +17644,10 @@
+#endif
+
+#endif /*COMMON_DRV_H_*/
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dbglog_api.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dbglog.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dbglog_api.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,46 @@
-+#ifndef _DBGLOG_API_H_
-+#define _DBGLOG_API_H_
-+/*
-+ * Copyright (c) 2004-2006 Atheros Communications Inc.
-+ * All rights reserved.
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * Software distributed under the License is distributed on an "AS
-+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+ * implied. See the License for the specific language governing
-+ * rights and limitations under the License.
-+ *
-+ *
-+ *
-+ * This file contains host side debug primitives.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include "dbglog.h"
-+
-+#define DBGLOG_HOST_LOG_BUFFER_SIZE DBGLOG_LOG_BUFFER_SIZE
-+
-+#define DBGLOG_GET_DBGID(arg) \
-+ ((arg & DBGLOG_DBGID_MASK) >> DBGLOG_DBGID_OFFSET)
-+
-+#define DBGLOG_GET_MODULEID(arg) \
-+ ((arg & DBGLOG_MODULEID_MASK) >> DBGLOG_MODULEID_OFFSET)
-+
-+#define DBGLOG_GET_NUMARGS(arg) \
-+ ((arg & DBGLOG_NUM_ARGS_MASK) >> DBGLOG_NUM_ARGS_OFFSET)
-+
-+#define DBGLOG_GET_TIMESTAMP(arg) \
-+ ((arg & DBGLOG_TIMESTAMP_MASK) >> DBGLOG_TIMESTAMP_OFFSET)
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* _DBGLOG_API_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dbglog.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dbglog.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dbglog.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -17754,10 +17756,61 @@
+#endif
+
+#endif /* _DBGLOG_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dbglog_id.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dbglog_api.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dbglog_id.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dbglog_api.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,46 @@
++#ifndef _DBGLOG_API_H_
++#define _DBGLOG_API_H_
++/*
++ * Copyright (c) 2004-2006 Atheros Communications Inc.
++ * All rights reserved.
++ *
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation;
++ *
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ *
++ *
++ *
++ * This file contains host side debug primitives.
++ */
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include "dbglog.h"
++
++#define DBGLOG_HOST_LOG_BUFFER_SIZE DBGLOG_LOG_BUFFER_SIZE
++
++#define DBGLOG_GET_DBGID(arg) \
++ ((arg & DBGLOG_DBGID_MASK) >> DBGLOG_DBGID_OFFSET)
++
++#define DBGLOG_GET_MODULEID(arg) \
++ ((arg & DBGLOG_MODULEID_MASK) >> DBGLOG_MODULEID_OFFSET)
++
++#define DBGLOG_GET_NUMARGS(arg) \
++ ((arg & DBGLOG_NUM_ARGS_MASK) >> DBGLOG_NUM_ARGS_OFFSET)
++
++#define DBGLOG_GET_TIMESTAMP(arg) \
++ ((arg & DBGLOG_TIMESTAMP_MASK) >> DBGLOG_TIMESTAMP_OFFSET)
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* _DBGLOG_API_H_ */
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dbglog_id.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dbglog_id.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,307 @@
+/*
+ *
@@ -18066,10 +18119,10 @@
+#endif
+
+#endif /* _DBGLOG_ID_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dl_list.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dl_list.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dl_list.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dl_list.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,114 @@
+/*
+ *
@@ -18185,10 +18238,10 @@
+}
+
+#endif /* __DL_LIST_H___ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dset_api.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dset_api.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dset_api.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dset_api.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2004-2006 Atheros Communications Inc.
@@ -18253,10 +18306,54 @@
+
+
+#endif /* _DSET_API_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dsetid.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dset_internal.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dsetid.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dset_internal.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,39 @@
++/*
++ * Copyright (c) 2007 Atheros Communications Inc.
++ * All rights reserved.
++ *
++ * $ATH_LICENSE_HOSTSDK0_C$
++ *
++ */
++
++#ifndef __DSET_INTERNAL_H__
++#define __DSET_INTERNAL_H__
++
++/*
++ * Internal dset definitions, common for DataSet layer.
++ */
++
++#define DSET_TYPE_STANDARD 0
++#define DSET_TYPE_BPATCHED 1
++#define DSET_TYPE_COMPRESSED 2
++
++/* Dataset descriptor */
++
++typedef struct dset_descriptor_s {
++ struct dset_descriptor_s *next; /* List link. NULL only at the last
++ descriptor */
++ A_UINT16 id; /* Dset ID */
++ A_UINT16 size; /* Dset size. */
++ void *DataPtr; /* Pointer to raw data for standard
++ DataSet or pointer to original
++ dset_descriptor for patched
++ DataSet */
++ A_UINT32 data_type; /* DSET_TYPE_*, above */
++
++ void *AuxPtr; /* Additional data that might
++ needed for data_type. For
++ example, pointer to patch
++ Dataset descriptor for BPatch. */
++} dset_descriptor_t;
++
++#endif /* __DSET_INTERNAL_H__ */
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dsetid.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/dsetid.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -18368,54 +18465,49 @@
+#define DSETID_BPATCH_FLAG 0x80000000
+
+#endif /* __DSETID_H__ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dset_internal.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/gpio.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/dset_internal.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,39 @@
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/gpio.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,34 @@
+/*
-+ * Copyright (c) 2007 Atheros Communications Inc.
++ * Copyright (c) 2005 Atheros Communications Inc.
+ * All rights reserved.
+ *
+ * $ATH_LICENSE_HOSTSDK0_C$
+ *
+ */
+
-+#ifndef __DSET_INTERNAL_H__
-+#define __DSET_INTERNAL_H__
++#if defined(AR6001)
++#define GPIO_PIN_COUNT 18
++#else
++#define GPIO_PIN_COUNT 18
++#endif
+
+/*
-+ * Internal dset definitions, common for DataSet layer.
++ * Possible values for WMIX_GPIO_SET_REGISTER_CMDID.
++ * NB: These match hardware order, so that addresses can
++ * easily be computed.
+ */
++#define GPIO_ID_OUT 0x00000000
++#define GPIO_ID_OUT_W1TS 0x00000001
++#define GPIO_ID_OUT_W1TC 0x00000002
++#define GPIO_ID_ENABLE 0x00000003
++#define GPIO_ID_ENABLE_W1TS 0x00000004
++#define GPIO_ID_ENABLE_W1TC 0x00000005
++#define GPIO_ID_IN 0x00000006
++#define GPIO_ID_STATUS 0x00000007
++#define GPIO_ID_STATUS_W1TS 0x00000008
++#define GPIO_ID_STATUS_W1TC 0x00000009
++#define GPIO_ID_PIN0 0x0000000a
++#define GPIO_ID_PIN(n) (GPIO_ID_PIN0+(n))
+
-+#define DSET_TYPE_STANDARD 0
-+#define DSET_TYPE_BPATCHED 1
-+#define DSET_TYPE_COMPRESSED 2
-+
-+/* Dataset descriptor */
-+
-+typedef struct dset_descriptor_s {
-+ struct dset_descriptor_s *next; /* List link. NULL only at the last
-+ descriptor */
-+ A_UINT16 id; /* Dset ID */
-+ A_UINT16 size; /* Dset size. */
-+ void *DataPtr; /* Pointer to raw data for standard
-+ DataSet or pointer to original
-+ dset_descriptor for patched
-+ DataSet */
-+ A_UINT32 data_type; /* DSET_TYPE_*, above */
-+
-+ void *AuxPtr; /* Additional data that might
-+ needed for data_type. For
-+ example, pointer to patch
-+ Dataset descriptor for BPatch. */
-+} dset_descriptor_t;
-+
-+#endif /* __DSET_INTERNAL_H__ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/gpio_api.h
++#define GPIO_LAST_REGISTER_ID GPIO_ID_PIN(17)
++#define GPIO_ID_NONE 0xffffffff
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/gpio_api.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/gpio_api.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/gpio_api.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,57 @@
+#ifndef _GPIO_API_H_
+#define _GPIO_API_H_
@@ -18474,49 +18566,10 @@
+A_STATUS wmi_gpio_intr_ack(struct wmi_t *wmip, A_UINT32 ack_mask);
+
+#endif /* _GPIO_API_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/gpio.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/hif.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/gpio.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,34 @@
-+/*
-+ * Copyright (c) 2005 Atheros Communications Inc.
-+ * All rights reserved.
-+ *
-+ * $ATH_LICENSE_HOSTSDK0_C$
-+ *
-+ */
-+
-+#if defined(AR6001)
-+#define GPIO_PIN_COUNT 18
-+#else
-+#define GPIO_PIN_COUNT 18
-+#endif
-+
-+/*
-+ * Possible values for WMIX_GPIO_SET_REGISTER_CMDID.
-+ * NB: These match hardware order, so that addresses can
-+ * easily be computed.
-+ */
-+#define GPIO_ID_OUT 0x00000000
-+#define GPIO_ID_OUT_W1TS 0x00000001
-+#define GPIO_ID_OUT_W1TC 0x00000002
-+#define GPIO_ID_ENABLE 0x00000003
-+#define GPIO_ID_ENABLE_W1TS 0x00000004
-+#define GPIO_ID_ENABLE_W1TC 0x00000005
-+#define GPIO_ID_IN 0x00000006
-+#define GPIO_ID_STATUS 0x00000007
-+#define GPIO_ID_STATUS_W1TS 0x00000008
-+#define GPIO_ID_STATUS_W1TC 0x00000009
-+#define GPIO_ID_PIN0 0x0000000a
-+#define GPIO_ID_PIN(n) (GPIO_ID_PIN0+(n))
-+
-+#define GPIO_LAST_REGISTER_ID GPIO_ID_PIN(17)
-+#define GPIO_ID_NONE 0xffffffff
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/hif.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/hif.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/hif.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -18809,10 +18862,10 @@
+#endif
+
+#endif /* _HIF_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/host_version.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/host_version.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/host_version.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/host_version.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,49 @@
+#ifndef _HOST_VERSION_H_
+#define _HOST_VERSION_H_
@@ -18863,10 +18916,205 @@
+#endif
+
+#endif /* _HOST_VERSION_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/htc_api.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/htc.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/htc_api.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/htc.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,190 @@
++/*
++ * Copyright (c) 2007 Atheros Communications Inc.
++ * All rights reserved.
++ *
++ * $ATH_LICENSE_HOSTSDK0_C$
++ *
++ */
++
++
++#ifndef __HTC_H__
++#define __HTC_H__
++
++#ifndef ATH_TARGET
++#include "athstartpack.h"
++#endif
++
++#define A_OFFSETOF(type,field) (int)(&(((type *)NULL)->field))
++
++#define ASSEMBLE_UNALIGNED_UINT16(p,highbyte,lowbyte) \
++ (((A_UINT16)(((A_UINT8 *)(p))[(highbyte)])) << 8 | (A_UINT16)(((A_UINT8 *)(p))[(lowbyte)]))
++
++/* alignment independent macros (little-endian) to fetch UINT16s or UINT8s from a
++ * structure using only the type and field name.
++ * Use these macros if there is the potential for unaligned buffer accesses. */
++#define A_GET_UINT16_FIELD(p,type,field) \
++ ASSEMBLE_UNALIGNED_UINT16(p,\
++ A_OFFSETOF(type,field) + 1, \
++ A_OFFSETOF(type,field))
++
++#define A_SET_UINT16_FIELD(p,type,field,value) \
++{ \
++ ((A_UINT8 *)(p))[A_OFFSETOF(type,field)] = (A_UINT8)(value); \
++ ((A_UINT8 *)(p))[A_OFFSETOF(type,field) + 1] = (A_UINT8)((value) >> 8); \
++}
++
++#define A_GET_UINT8_FIELD(p,type,field) \
++ ((A_UINT8 *)(p))[A_OFFSETOF(type,field)]
++
++#define A_SET_UINT8_FIELD(p,type,field,value) \
++ ((A_UINT8 *)(p))[A_OFFSETOF(type,field)] = (value)
++
++/****** DANGER DANGER ***************
++ *
++ * The frame header length and message formats defined herein were
++ * selected to accommodate optimal alignment for target processing. This reduces code
++ * size and improves performance.
++ *
++ * Any changes to the header length may alter the alignment and cause exceptions
++ * on the target. When adding to the message structures insure that fields are
++ * properly aligned.
++ *
++ */
++
++/* HTC frame header */
++typedef PREPACK struct _HTC_FRAME_HDR{
++ /* do not remove or re-arrange these fields, these are minimally required
++ * to take advantage of 4-byte lookaheads in some hardware implementations */
++ A_UINT8 EndpointID;
++ A_UINT8 Flags;
++ A_UINT16 PayloadLen; /* length of data (including trailer) that follows the header */
++
++ /***** end of 4-byte lookahead ****/
++
++ A_UINT8 ControlBytes[2];
++
++ /* message payload starts after the header */
++
++} POSTPACK HTC_FRAME_HDR;
++
++/* frame header flags */
++#define HTC_FLAGS_NEED_CREDIT_UPDATE (1 << 0)
++#define HTC_FLAGS_RECV_TRAILER (1 << 1)
++
++
++#define HTC_HDR_LENGTH (sizeof(HTC_FRAME_HDR))
++#define HTC_MAX_TRAILER_LENGTH 255
++#define HTC_MAX_PAYLOAD_LENGTH (2048 - sizeof(HTC_FRAME_HDR))
++
++/* HTC control message IDs */
++typedef enum {
++ HTC_MSG_READY_ID = 1,
++ HTC_MSG_CONNECT_SERVICE_ID = 2,
++ HTC_MSG_CONNECT_SERVICE_RESPONSE_ID = 3,
++ HTC_MSG_SETUP_COMPLETE_ID = 4,
++} HTC_MSG_IDS;
++
++#define HTC_MAX_CONTROL_MESSAGE_LENGTH 256
++
++/* base message ID header */
++typedef PREPACK struct {
++ A_UINT16 MessageID;
++} POSTPACK HTC_UNKNOWN_MSG;
++
++/* HTC ready message
++ * direction : target-to-host */
++typedef PREPACK struct {
++ A_UINT16 MessageID; /* ID */
++ A_UINT16 CreditCount; /* number of credits the target can offer */
++ A_UINT16 CreditSize; /* size of each credit */
++ A_UINT8 MaxEndpoints; /* maximum number of endpoints the target has resources for */
++ A_UINT8 _Pad1;
++} POSTPACK HTC_READY_MSG;
++
++#define HTC_SERVICE_META_DATA_MAX_LENGTH 128
++
++/* connect service
++ * direction : host-to-target */
++typedef PREPACK struct {
++ A_UINT16 MessageID;
++ A_UINT16 ServiceID; /* service ID of the service to connect to */
++ A_UINT16 ConnectionFlags; /* connection flags */
++
++#define HTC_CONNECT_FLAGS_REDUCE_CREDIT_DRIBBLE (1 << 2) /* reduce credit dribbling when
++ the host needs credits */
++#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_MASK (0x3)
++#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_ONE_FOURTH 0x0
++#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_ONE_HALF 0x1
++#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_THREE_FOURTHS 0x2
++#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_UNITY 0x3
++
++ A_UINT8 ServiceMetaLength; /* length of meta data that follows */
++ A_UINT8 _Pad1;
++
++ /* service-specific meta data starts after the header */
++
++} POSTPACK HTC_CONNECT_SERVICE_MSG;
++
++/* connect response
++ * direction : target-to-host */
++typedef PREPACK struct {
++ A_UINT16 MessageID;
++ A_UINT16 ServiceID; /* service ID that the connection request was made */
++ A_UINT8 Status; /* service connection status */
++ A_UINT8 EndpointID; /* assigned endpoint ID */
++ A_UINT16 MaxMsgSize; /* maximum expected message size on this endpoint */
++ A_UINT8 ServiceMetaLength; /* length of meta data that follows */
++ A_UINT8 _Pad1;
++
++ /* service-specific meta data starts after the header */
++
++} POSTPACK HTC_CONNECT_SERVICE_RESPONSE_MSG;
++
++typedef PREPACK struct {
++ A_UINT16 MessageID;
++ /* currently, no other fields */
++} POSTPACK HTC_SETUP_COMPLETE_MSG;
++
++
++/* connect response status codes */
++#define HTC_SERVICE_SUCCESS 0 /* success */
++#define HTC_SERVICE_NOT_FOUND 1 /* service could not be found */
++#define HTC_SERVICE_FAILED 2 /* specific service failed the connect */
++#define HTC_SERVICE_NO_RESOURCES 3 /* no resources (i.e. no more endpoints) */
++#define HTC_SERVICE_NO_MORE_EP 4 /* specific service is not allowing any more
++ endpoints */
++
++/* report record IDs */
++typedef enum {
++ HTC_RECORD_NULL = 0,
++ HTC_RECORD_CREDITS = 1,
++ HTC_RECORD_LOOKAHEAD = 2,
++} HTC_RPT_IDS;
++
++typedef PREPACK struct {
++ A_UINT8 RecordID; /* Record ID */
++ A_UINT8 Length; /* Length of record */
++} POSTPACK HTC_RECORD_HDR;
++
++typedef PREPACK struct {
++ A_UINT8 EndpointID; /* Endpoint that owns these credits */
++ A_UINT8 Credits; /* credits to report since last report */
++} POSTPACK HTC_CREDIT_REPORT;
++
++typedef PREPACK struct {
++ A_UINT8 PreValid; /* pre valid guard */
++ A_UINT8 LookAhead[4]; /* 4 byte lookahead */
++ A_UINT8 PostValid; /* post valid guard */
++
++ /* NOTE: the LookAhead array is guarded by a PreValid and Post Valid guard bytes.
++ * The PreValid bytes must equal the inverse of the PostValid byte */
++
++} POSTPACK HTC_LOOKAHEAD_REPORT;
++
++#ifndef ATH_TARGET
++#include "athendpack.h"
++#endif
++
++
++#endif /* __HTC_H__ */
++
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/htc_api.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/htc_api.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,436 @@
+/*
+ *
@@ -19304,205 +19552,10 @@
+#endif
+
+#endif /* _HTC_API_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/htc.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/htc_packet.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/htc.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,190 @@
-+/*
-+ * Copyright (c) 2007 Atheros Communications Inc.
-+ * All rights reserved.
-+ *
-+ * $ATH_LICENSE_HOSTSDK0_C$
-+ *
-+ */
-+
-+
-+#ifndef __HTC_H__
-+#define __HTC_H__
-+
-+#ifndef ATH_TARGET
-+#include "athstartpack.h"
-+#endif
-+
-+#define A_OFFSETOF(type,field) (int)(&(((type *)NULL)->field))
-+
-+#define ASSEMBLE_UNALIGNED_UINT16(p,highbyte,lowbyte) \
-+ (((A_UINT16)(((A_UINT8 *)(p))[(highbyte)])) << 8 | (A_UINT16)(((A_UINT8 *)(p))[(lowbyte)]))
-+
-+/* alignment independent macros (little-endian) to fetch UINT16s or UINT8s from a
-+ * structure using only the type and field name.
-+ * Use these macros if there is the potential for unaligned buffer accesses. */
-+#define A_GET_UINT16_FIELD(p,type,field) \
-+ ASSEMBLE_UNALIGNED_UINT16(p,\
-+ A_OFFSETOF(type,field) + 1, \
-+ A_OFFSETOF(type,field))
-+
-+#define A_SET_UINT16_FIELD(p,type,field,value) \
-+{ \
-+ ((A_UINT8 *)(p))[A_OFFSETOF(type,field)] = (A_UINT8)(value); \
-+ ((A_UINT8 *)(p))[A_OFFSETOF(type,field) + 1] = (A_UINT8)((value) >> 8); \
-+}
-+
-+#define A_GET_UINT8_FIELD(p,type,field) \
-+ ((A_UINT8 *)(p))[A_OFFSETOF(type,field)]
-+
-+#define A_SET_UINT8_FIELD(p,type,field,value) \
-+ ((A_UINT8 *)(p))[A_OFFSETOF(type,field)] = (value)
-+
-+/****** DANGER DANGER ***************
-+ *
-+ * The frame header length and message formats defined herein were
-+ * selected to accommodate optimal alignment for target processing. This reduces code
-+ * size and improves performance.
-+ *
-+ * Any changes to the header length may alter the alignment and cause exceptions
-+ * on the target. When adding to the message structures insure that fields are
-+ * properly aligned.
-+ *
-+ */
-+
-+/* HTC frame header */
-+typedef PREPACK struct _HTC_FRAME_HDR{
-+ /* do not remove or re-arrange these fields, these are minimally required
-+ * to take advantage of 4-byte lookaheads in some hardware implementations */
-+ A_UINT8 EndpointID;
-+ A_UINT8 Flags;
-+ A_UINT16 PayloadLen; /* length of data (including trailer) that follows the header */
-+
-+ /***** end of 4-byte lookahead ****/
-+
-+ A_UINT8 ControlBytes[2];
-+
-+ /* message payload starts after the header */
-+
-+} POSTPACK HTC_FRAME_HDR;
-+
-+/* frame header flags */
-+#define HTC_FLAGS_NEED_CREDIT_UPDATE (1 << 0)
-+#define HTC_FLAGS_RECV_TRAILER (1 << 1)
-+
-+
-+#define HTC_HDR_LENGTH (sizeof(HTC_FRAME_HDR))
-+#define HTC_MAX_TRAILER_LENGTH 255
-+#define HTC_MAX_PAYLOAD_LENGTH (2048 - sizeof(HTC_FRAME_HDR))
-+
-+/* HTC control message IDs */
-+typedef enum {
-+ HTC_MSG_READY_ID = 1,
-+ HTC_MSG_CONNECT_SERVICE_ID = 2,
-+ HTC_MSG_CONNECT_SERVICE_RESPONSE_ID = 3,
-+ HTC_MSG_SETUP_COMPLETE_ID = 4,
-+} HTC_MSG_IDS;
-+
-+#define HTC_MAX_CONTROL_MESSAGE_LENGTH 256
-+
-+/* base message ID header */
-+typedef PREPACK struct {
-+ A_UINT16 MessageID;
-+} POSTPACK HTC_UNKNOWN_MSG;
-+
-+/* HTC ready message
-+ * direction : target-to-host */
-+typedef PREPACK struct {
-+ A_UINT16 MessageID; /* ID */
-+ A_UINT16 CreditCount; /* number of credits the target can offer */
-+ A_UINT16 CreditSize; /* size of each credit */
-+ A_UINT8 MaxEndpoints; /* maximum number of endpoints the target has resources for */
-+ A_UINT8 _Pad1;
-+} POSTPACK HTC_READY_MSG;
-+
-+#define HTC_SERVICE_META_DATA_MAX_LENGTH 128
-+
-+/* connect service
-+ * direction : host-to-target */
-+typedef PREPACK struct {
-+ A_UINT16 MessageID;
-+ A_UINT16 ServiceID; /* service ID of the service to connect to */
-+ A_UINT16 ConnectionFlags; /* connection flags */
-+
-+#define HTC_CONNECT_FLAGS_REDUCE_CREDIT_DRIBBLE (1 << 2) /* reduce credit dribbling when
-+ the host needs credits */
-+#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_MASK (0x3)
-+#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_ONE_FOURTH 0x0
-+#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_ONE_HALF 0x1
-+#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_THREE_FOURTHS 0x2
-+#define HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_UNITY 0x3
-+
-+ A_UINT8 ServiceMetaLength; /* length of meta data that follows */
-+ A_UINT8 _Pad1;
-+
-+ /* service-specific meta data starts after the header */
-+
-+} POSTPACK HTC_CONNECT_SERVICE_MSG;
-+
-+/* connect response
-+ * direction : target-to-host */
-+typedef PREPACK struct {
-+ A_UINT16 MessageID;
-+ A_UINT16 ServiceID; /* service ID that the connection request was made */
-+ A_UINT8 Status; /* service connection status */
-+ A_UINT8 EndpointID; /* assigned endpoint ID */
-+ A_UINT16 MaxMsgSize; /* maximum expected message size on this endpoint */
-+ A_UINT8 ServiceMetaLength; /* length of meta data that follows */
-+ A_UINT8 _Pad1;
-+
-+ /* service-specific meta data starts after the header */
-+
-+} POSTPACK HTC_CONNECT_SERVICE_RESPONSE_MSG;
-+
-+typedef PREPACK struct {
-+ A_UINT16 MessageID;
-+ /* currently, no other fields */
-+} POSTPACK HTC_SETUP_COMPLETE_MSG;
-+
-+
-+/* connect response status codes */
-+#define HTC_SERVICE_SUCCESS 0 /* success */
-+#define HTC_SERVICE_NOT_FOUND 1 /* service could not be found */
-+#define HTC_SERVICE_FAILED 2 /* specific service failed the connect */
-+#define HTC_SERVICE_NO_RESOURCES 3 /* no resources (i.e. no more endpoints) */
-+#define HTC_SERVICE_NO_MORE_EP 4 /* specific service is not allowing any more
-+ endpoints */
-+
-+/* report record IDs */
-+typedef enum {
-+ HTC_RECORD_NULL = 0,
-+ HTC_RECORD_CREDITS = 1,
-+ HTC_RECORD_LOOKAHEAD = 2,
-+} HTC_RPT_IDS;
-+
-+typedef PREPACK struct {
-+ A_UINT8 RecordID; /* Record ID */
-+ A_UINT8 Length; /* Length of record */
-+} POSTPACK HTC_RECORD_HDR;
-+
-+typedef PREPACK struct {
-+ A_UINT8 EndpointID; /* Endpoint that owns these credits */
-+ A_UINT8 Credits; /* credits to report since last report */
-+} POSTPACK HTC_CREDIT_REPORT;
-+
-+typedef PREPACK struct {
-+ A_UINT8 PreValid; /* pre valid guard */
-+ A_UINT8 LookAhead[4]; /* 4 byte lookahead */
-+ A_UINT8 PostValid; /* post valid guard */
-+
-+ /* NOTE: the LookAhead array is guarded by a PreValid and Post Valid guard bytes.
-+ * The PreValid bytes must equal the inverse of the PostValid byte */
-+
-+} POSTPACK HTC_LOOKAHEAD_REPORT;
-+
-+#ifndef ATH_TARGET
-+#include "athendpack.h"
-+#endif
-+
-+
-+#endif /* __HTC_H__ */
-+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/htc_packet.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/htc_packet.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/htc_packet.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,138 @@
+/*
+ *
@@ -19642,10 +19695,10 @@
+}
+
+#endif /*HTC_PACKET_H_*/
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/htc_services.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/htc_services.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/htc_services.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/htc_services.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2007 Atheros Communications Inc.
@@ -19684,10 +19737,10 @@
+#define HTC_RAW_STREAMS_SVC MAKE_SERVICE_ID(HTC_TEST_GROUP,0)
+
+#endif /*HTC_SERVICES_H_*/
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ieee80211.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ieee80211.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ieee80211.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ieee80211.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,342 @@
+/*-
+ * Copyright (c) 2001 Atsushi Onoe
@@ -20031,10 +20084,10 @@
+#include "athendpack.h"
+
+#endif /* _NET80211_IEEE80211_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ieee80211_ioctl.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ieee80211_ioctl.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ieee80211_ioctl.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ieee80211_ioctl.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2004-2005 Atheros Communications Inc.
@@ -20199,10 +20252,10 @@
+#endif
+
+#endif /* _IEEE80211_IOCTL_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ieee80211_node.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ieee80211_node.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ieee80211_node.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ieee80211_node.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,77 @@
+/*-
+ * Copyright (c) 2001 Atsushi Onoe
@@ -20281,10 +20334,10 @@
+#define WLAN_NODE_INACT_TIMEOUT_MSEC 10000
+
+#endif /* _IEEE80211_NODE_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ini_dset.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ini_dset.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/ini_dset.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/ini_dset.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -20326,10 +20379,10 @@
+} POSTPACK INI_DSET_REG_OVERRIDE;
+
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/regDb.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/regDb.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/regDb.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/regDb.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2005 Atheros Communications, Inc.
@@ -20350,10 +20403,10 @@
+#include "./regulatory/reg_dbvalues.h"
+
+#endif /* __REG_DB_H__ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/regdump.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/regdump.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/regdump.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/regdump.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,33 @@
+#ifndef __REGDUMP_H__
+#define __REGDUMP_H__
@@ -20388,10 +20441,10 @@
+};
+#endif /* __ASSEMBLER__ */
+#endif /* __REGDUMP_H__ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/targaddrs.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/targaddrs.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/targaddrs.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/targaddrs.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -20551,10 +20604,10 @@
+#endif /* !__ASSEMBLER__ */
+
+#endif /* __TARGADDRS_H__ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/testcmd.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/testcmd.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/testcmd.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/testcmd.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2004-2005 Atheros Communications Inc.
@@ -20700,10 +20753,10 @@
+#endif
+
+#endif /* TESTCMD_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wlan_api.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wlan_api.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wlan_api.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wlan_api.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,101 @@
+#ifndef _HOST_WLAN_API_H_
+#define _HOST_WLAN_API_H_
@@ -20806,10 +20859,10 @@
+#endif
+
+#endif /* _HOST_WLAN_API_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wlan_dset.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wlan_dset.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wlan_dset.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wlan_dset.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2007 Atheros Communications, Inc.
@@ -20831,274 +20884,10 @@
+} POSTPACK WOW_CONFIG_DSET;
+
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wmi_api.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wmi.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wmi_api.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,259 @@
-+#ifndef _WMI_API_H_
-+#define _WMI_API_H_
-+/*
-+ * Copyright (c) 2004-2006 Atheros Communications Inc.
-+ * All rights reserved.
-+ *
-+ * This file contains the definitions for the Wireless Module Interface (WMI).
-+ *
-+ * $Id: //depot/sw/releases/olca2.0-GPL/host/include/wmi_api.h#2 $
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * Software distributed under the License is distributed on an "AS
-+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+ * implied. See the License for the specific language governing
-+ * rights and limitations under the License.
-+ *
-+ *
-+ *
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/*
-+ * IP QoS Field definitions according to 802.1p
-+ */
-+#define BEST_EFFORT_PRI 0
-+#define BACKGROUND_PRI 1
-+#define EXCELLENT_EFFORT_PRI 3
-+#define CONTROLLED_LOAD_PRI 4
-+#define VIDEO_PRI 5
-+#define VOICE_PRI 6
-+#define NETWORK_CONTROL_PRI 7
-+#define MAX_NUM_PRI 8
-+
-+#define UNDEFINED_PRI (0xff)
-+
-+/* simple mapping of IP TOS field to a WMI priority stream
-+ * this mapping was taken from the original linux driver implementation
-+ * The operation maps the following
-+ *
-+ * */
-+#define IP_TOS_TO_WMI_PRI(tos) \
-+ ((WMI_PRI_STREAM_ID)(((tos) >> 1) & 0x03))
-+
-+#define WMI_IMPLICIT_PSTREAM_INACTIVITY_INT 5000 /* 5 seconds */
-+
-+
-+struct wmi_t;
-+
-+void *wmi_init(void *devt);
-+
-+void wmi_qos_state_init(struct wmi_t *wmip);
-+void wmi_shutdown(struct wmi_t *wmip);
-+A_UINT16 wmi_get_mapped_qos_queue(struct wmi_t *, A_UINT8);
-+A_STATUS wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf);
-+A_STATUS wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, A_UINT8 msgType);
-+A_STATUS wmi_dot3_2_dix(struct wmi_t *wmip, void *osbuf);
-+A_STATUS wmi_data_hdr_remove(struct wmi_t *wmip, void *osbuf);
-+A_STATUS wmi_syncpoint(struct wmi_t *wmip);
-+A_STATUS wmi_syncpoint_reset(struct wmi_t *wmip);
-+WMI_PRI_STREAM_ID wmi_get_stream_id(struct wmi_t *wmip, A_UINT8 trafficClass);
-+A_UINT8 wmi_implicit_create_pstream(struct wmi_t *wmip, void *osbuf, A_UINT8 dir, A_UINT8 up);
-+
-+A_STATUS wmi_control_rx(struct wmi_t *wmip, void *osbuf);
-+void wmi_iterate_nodes(struct wmi_t *wmip, wlan_node_iter_func *f, void *arg);
-+void wmi_free_allnodes(struct wmi_t *wmip);
-+bss_t *wmi_find_node(struct wmi_t *wmip, const A_UINT8 *macaddr);
-+
-+
-+typedef enum {
-+ NO_SYNC_WMIFLAG = 0,
-+ SYNC_BEFORE_WMIFLAG, /* transmit all queued data before cmd */
-+ SYNC_AFTER_WMIFLAG, /* any new data waits until cmd execs */
-+ SYNC_BOTH_WMIFLAG,
-+ END_WMIFLAG /* end marker */
-+} WMI_SYNC_FLAG;
-+
-+A_STATUS wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
-+ WMI_SYNC_FLAG flag);
-+A_STATUS wmi_connect_cmd(struct wmi_t *wmip,
-+ NETWORK_TYPE netType,
-+ DOT11_AUTH_MODE dot11AuthMode,
-+ AUTH_MODE authMode,
-+ CRYPTO_TYPE pairwiseCrypto,
-+ A_UINT8 pairwiseCryptoLen,
-+ CRYPTO_TYPE groupCrypto,
-+ A_UINT8 groupCryptoLen,
-+ int ssidLength,
-+ A_UCHAR *ssid,
-+ A_UINT8 *bssid,
-+ A_UINT16 channel,
-+ A_UINT32 ctrl_flags);
-+A_STATUS wmi_reconnect_cmd(struct wmi_t *wmip,
-+ A_UINT8 *bssid,
-+ A_UINT16 channel);
-+A_STATUS wmi_disconnect_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_getrev_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType,
-+ A_BOOL forceFgScan, A_BOOL isLegacy,
-+ A_UINT32 homeDwellTime, A_UINT32 forceScanInterval);
-+A_STATUS wmi_scanparams_cmd(struct wmi_t *wmip, A_UINT16 fg_start_sec,
-+ A_UINT16 fg_end_sec, A_UINT16 bg_sec,
-+ A_UINT16 minact_chdw_msec,
-+ A_UINT16 maxact_chdw_msec, A_UINT16 pas_chdw_msec,
-+ A_UINT8 shScanRatio, A_UINT8 scanCtrlFlags,
-+ A_UINT32 max_dfsch_act_time);
-+A_STATUS wmi_bssfilter_cmd(struct wmi_t *wmip, A_UINT8 filter, A_UINT32 ieMask);
-+A_STATUS wmi_probedSsid_cmd(struct wmi_t *wmip, A_UINT8 index, A_UINT8 flag,
-+ A_UINT8 ssidLength, A_UCHAR *ssid);
-+A_STATUS wmi_listeninterval_cmd(struct wmi_t *wmip, A_UINT16 listenInterval, A_UINT16 listenBeacons);
-+A_STATUS wmi_bmisstime_cmd(struct wmi_t *wmip, A_UINT16 bmisstime, A_UINT16 bmissbeacons);
-+A_STATUS wmi_associnfo_cmd(struct wmi_t *wmip, A_UINT8 ieType,
-+ A_UINT8 ieLen, A_UINT8 *ieInfo);
-+A_STATUS wmi_powermode_cmd(struct wmi_t *wmip, A_UINT8 powerMode);
-+A_STATUS wmi_ibsspmcaps_cmd(struct wmi_t *wmip, A_UINT8 pmEnable, A_UINT8 ttl,
-+ A_UINT16 atim_windows, A_UINT16 timeout_value);
-+A_STATUS wmi_pmparams_cmd(struct wmi_t *wmip, A_UINT16 idlePeriod,
-+ A_UINT16 psPollNum, A_UINT16 dtimPolicy);
-+A_STATUS wmi_disctimeout_cmd(struct wmi_t *wmip, A_UINT8 timeout);
-+A_STATUS wmi_sync_cmd(struct wmi_t *wmip, A_UINT8 syncNumber);
-+A_STATUS wmi_create_pstream_cmd(struct wmi_t *wmip, WMI_CREATE_PSTREAM_CMD *pstream);
-+A_STATUS wmi_delete_pstream_cmd(struct wmi_t *wmip, A_UINT8 trafficClass, A_UINT8 streamID);
-+A_STATUS wmi_set_bitrate_cmd(struct wmi_t *wmip, A_INT32 rate);
-+A_STATUS wmi_get_bitrate_cmd(struct wmi_t *wmip);
-+A_INT8 wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate);
-+A_STATUS wmi_get_regDomain_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_get_channelList_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_set_channelParams_cmd(struct wmi_t *wmip, A_UINT8 scanParam,
-+ WMI_PHY_MODE mode, A_INT8 numChan,
-+ A_UINT16 *channelList);
-+
-+A_STATUS wmi_set_snr_threshold_params(struct wmi_t *wmip,
-+ WMI_SNR_THRESHOLD_PARAMS_CMD *snrCmd);
-+A_STATUS wmi_set_rssi_threshold_params(struct wmi_t *wmip,
-+ WMI_RSSI_THRESHOLD_PARAMS_CMD *rssiCmd);
-+A_STATUS wmi_clr_rssi_snr(struct wmi_t *wmip);
-+A_STATUS wmi_set_lq_threshold_params(struct wmi_t *wmip,
-+ WMI_LQ_THRESHOLD_PARAMS_CMD *lqCmd);
-+A_STATUS wmi_set_rts_cmd(struct wmi_t *wmip, A_UINT16 threshold);
-+A_STATUS wmi_set_lpreamble_cmd(struct wmi_t *wmip, A_UINT8 status);
-+
-+A_STATUS wmi_set_error_report_bitmask(struct wmi_t *wmip, A_UINT32 bitmask);
-+
-+A_STATUS wmi_get_challenge_resp_cmd(struct wmi_t *wmip, A_UINT32 cookie,
-+ A_UINT32 source);
-+A_STATUS wmi_config_debug_module_cmd(struct wmi_t *wmip, A_UINT16 mmask,
-+ A_UINT16 tsr, A_BOOL rep, A_UINT16 size,
-+ A_UINT32 valid);
-+A_STATUS wmi_get_stats_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_addKey_cmd(struct wmi_t *wmip, A_UINT8 keyIndex,
-+ CRYPTO_TYPE keyType, A_UINT8 keyUsage,
-+ A_UINT8 keyLength,A_UINT8 *keyRSC,
-+ A_UINT8 *keyMaterial, A_UINT8 key_op_ctrl,
-+ WMI_SYNC_FLAG sync_flag);
-+A_STATUS wmi_add_krk_cmd(struct wmi_t *wmip, A_UINT8 *krk);
-+A_STATUS wmi_delete_krk_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_deleteKey_cmd(struct wmi_t *wmip, A_UINT8 keyIndex);
-+A_STATUS wmi_set_akmp_params_cmd(struct wmi_t *wmip,
-+ WMI_SET_AKMP_PARAMS_CMD *akmpParams);
-+A_STATUS wmi_get_pmkid_list_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_set_pmkid_list_cmd(struct wmi_t *wmip,
-+ WMI_SET_PMKID_LIST_CMD *pmkInfo);
-+A_STATUS wmi_set_txPwr_cmd(struct wmi_t *wmip, A_UINT8 dbM);
-+A_STATUS wmi_get_txPwr_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_addBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex, A_UINT8 *bssid);
-+A_STATUS wmi_deleteBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex);
-+A_STATUS wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, A_BOOL en);
-+A_STATUS wmi_setPmkid_cmd(struct wmi_t *wmip, A_UINT8 *bssid, A_UINT8 *pmkId,
-+ A_BOOL set);
-+A_STATUS wmi_set_access_params_cmd(struct wmi_t *wmip, A_UINT16 txop,
-+ A_UINT8 eCWmin, A_UINT8 eCWmax,
-+ A_UINT8 aifsn);
-+A_STATUS wmi_set_retry_limits_cmd(struct wmi_t *wmip, A_UINT8 frameType,
-+ A_UINT8 trafficClass, A_UINT8 maxRetries,
-+ A_UINT8 enableNotify);
-+
-+void wmi_get_current_bssid(struct wmi_t *wmip, A_UINT8 *bssid);
-+
-+A_STATUS wmi_get_roam_tbl_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_get_roam_data_cmd(struct wmi_t *wmip, A_UINT8 roamDataType);
-+A_STATUS wmi_set_roam_ctrl_cmd(struct wmi_t *wmip, WMI_SET_ROAM_CTRL_CMD *p,
-+ A_UINT8 size);
-+A_STATUS wmi_set_powersave_timers_cmd(struct wmi_t *wmip,
-+ WMI_POWERSAVE_TIMERS_POLICY_CMD *pCmd,
-+ A_UINT8 size);
-+
-+A_STATUS wmi_set_opt_mode_cmd(struct wmi_t *wmip, A_UINT8 optMode);
-+A_STATUS wmi_opt_tx_frame_cmd(struct wmi_t *wmip,
-+ A_UINT8 frmType,
-+ A_UINT8 *dstMacAddr,
-+ A_UINT8 *bssid,
-+ A_UINT16 optIEDataLen,
-+ A_UINT8 *optIEData);
-+
-+A_STATUS wmi_set_adhoc_bconIntvl_cmd(struct wmi_t *wmip, A_UINT16 intvl);
-+A_STATUS wmi_set_voice_pkt_size_cmd(struct wmi_t *wmip, A_UINT16 voicePktSize);
-+A_STATUS wmi_set_max_sp_len_cmd(struct wmi_t *wmip, A_UINT8 maxSpLen);
-+A_UINT8 convert_userPriority_to_trafficClass(A_UINT8 userPriority);
-+A_UINT8 wmi_get_power_mode_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_verify_tspec_params(WMI_CREATE_PSTREAM_CMD *pCmd, A_BOOL tspecCompliance);
-+
-+#ifdef CONFIG_HOST_TCMD_SUPPORT
-+A_STATUS wmi_test_cmd(struct wmi_t *wmip, A_UINT8 *buf, A_UINT32 len);
-+#endif
-+
-+A_STATUS wmi_set_bt_status_cmd(struct wmi_t *wmip, A_UINT8 streamType, A_UINT8 status);
-+A_STATUS wmi_set_bt_params_cmd(struct wmi_t *wmip, WMI_SET_BT_PARAMS_CMD* cmd);
-+
-+
-+/*
-+ * This function is used to configure the fix rates mask to the target.
-+ */
-+A_STATUS wmi_set_fixrates_cmd(struct wmi_t *wmip, A_INT16 fixRatesMask);
-+A_STATUS wmi_get_ratemask_cmd(struct wmi_t *wmip);
-+
-+A_STATUS wmi_set_authmode_cmd(struct wmi_t *wmip, A_UINT8 mode);
-+
-+A_STATUS wmi_set_reassocmode_cmd(struct wmi_t *wmip, A_UINT8 mode);
-+
-+A_STATUS wmi_set_wmm_cmd(struct wmi_t *wmip, WMI_WMM_STATUS status);
-+A_STATUS wmi_set_wmm_txop(struct wmi_t *wmip, WMI_TXOP_CFG txEnable);
-+
-+A_STATUS wmi_get_keepalive_configured(struct wmi_t *wmip);
-+A_UINT8 wmi_get_keepalive_cmd(struct wmi_t *wmip);
-+A_STATUS wmi_set_keepalive_cmd(struct wmi_t *wmip, A_UINT8 keepaliveInterval);
-+
-+A_STATUS wmi_set_appie_cmd(struct wmi_t *wmip, A_UINT8 mgmtFrmType,
-+ A_UINT8 ieLen,A_UINT8 *ieInfo);
-+
-+A_STATUS wmi_set_halparam_cmd(struct wmi_t *wmip, A_UINT8 *cmd, A_UINT16 dataLen);
-+A_INT32 wmi_get_rate(A_INT8 rateindex);
-+
-+/*Wake on Wireless WMI commands*/
-+A_STATUS wmi_set_host_sleep_mode_cmd(struct wmi_t *wmip, WMI_SET_HOST_SLEEP_MODE_CMD *cmd);
-+A_STATUS wmi_set_wow_mode_cmd(struct wmi_t *wmip, WMI_SET_WOW_MODE_CMD *cmd);
-+A_STATUS wmi_get_wow_list_cmd(struct wmi_t *wmip, WMI_GET_WOW_LIST_CMD *cmd);
-+A_STATUS wmi_add_wow_pattern_cmd(struct wmi_t *wmip,
-+ WMI_ADD_WOW_PATTERN_CMD *cmd, A_UINT8* pattern, A_UINT8* mask, A_UINT8 pattern_size);
-+A_STATUS wmi_del_wow_pattern_cmd(struct wmi_t *wmip,
-+ WMI_DEL_WOW_PATTERN_CMD *cmd);
-+A_STATUS wmi_set_wsc_status_cmd(struct wmi_t *wmip, A_UINT32 status);
-+
-+bss_t *
-+wmi_find_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid,
-+ A_UINT32 ssidLength, A_BOOL bIsWPA2);
-+
-+void
-+wmi_node_return (struct wmi_t *wmip, bss_t *bss);
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* _WMI_API_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wmi.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wmi.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wmi.h 2008-01-22 16:57:48.000000000 +0100
@@ -0,0 +1,1739 @@
+/*
+ * Copyright (c) 2004-2006 Atheros Communications Inc.
@@ -22205,7 +21994,7 @@
+ A_UINT8 snr;
+ A_INT16 rssi;
+ A_UINT8 bssid[ATH_MAC_LEN];
-+// A_UINT32 ieMask;
++ A_UINT32 ieMask;
+} POSTPACK WMI_BSS_INFO_HDR;
+
+/*
@@ -22839,10 +22628,274 @@
+#endif
+
+#endif /* _WMI_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wmix.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wmi_api.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/include/wmix.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wmi_api.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,259 @@
++#ifndef _WMI_API_H_
++#define _WMI_API_H_
++/*
++ * Copyright (c) 2004-2006 Atheros Communications Inc.
++ * All rights reserved.
++ *
++ * This file contains the definitions for the Wireless Module Interface (WMI).
++ *
++ * $Id: //depot/sw/releases/olca2.0-GPL/host/include/wmi_api.h#2 $
++ *
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation;
++ *
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ *
++ *
++ *
++ */
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*
++ * IP QoS Field definitions according to 802.1p
++ */
++#define BEST_EFFORT_PRI 0
++#define BACKGROUND_PRI 1
++#define EXCELLENT_EFFORT_PRI 3
++#define CONTROLLED_LOAD_PRI 4
++#define VIDEO_PRI 5
++#define VOICE_PRI 6
++#define NETWORK_CONTROL_PRI 7
++#define MAX_NUM_PRI 8
++
++#define UNDEFINED_PRI (0xff)
++
++/* simple mapping of IP TOS field to a WMI priority stream
++ * this mapping was taken from the original linux driver implementation
++ * The operation maps the following
++ *
++ * */
++#define IP_TOS_TO_WMI_PRI(tos) \
++ ((WMI_PRI_STREAM_ID)(((tos) >> 1) & 0x03))
++
++#define WMI_IMPLICIT_PSTREAM_INACTIVITY_INT 5000 /* 5 seconds */
++
++
++struct wmi_t;
++
++void *wmi_init(void *devt);
++
++void wmi_qos_state_init(struct wmi_t *wmip);
++void wmi_shutdown(struct wmi_t *wmip);
++A_UINT16 wmi_get_mapped_qos_queue(struct wmi_t *, A_UINT8);
++A_STATUS wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf);
++A_STATUS wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, A_UINT8 msgType);
++A_STATUS wmi_dot3_2_dix(struct wmi_t *wmip, void *osbuf);
++A_STATUS wmi_data_hdr_remove(struct wmi_t *wmip, void *osbuf);
++A_STATUS wmi_syncpoint(struct wmi_t *wmip);
++A_STATUS wmi_syncpoint_reset(struct wmi_t *wmip);
++WMI_PRI_STREAM_ID wmi_get_stream_id(struct wmi_t *wmip, A_UINT8 trafficClass);
++A_UINT8 wmi_implicit_create_pstream(struct wmi_t *wmip, void *osbuf, A_UINT8 dir, A_UINT8 up);
++
++A_STATUS wmi_control_rx(struct wmi_t *wmip, void *osbuf);
++void wmi_iterate_nodes(struct wmi_t *wmip, wlan_node_iter_func *f, void *arg);
++void wmi_free_allnodes(struct wmi_t *wmip);
++bss_t *wmi_find_node(struct wmi_t *wmip, const A_UINT8 *macaddr);
++
++
++typedef enum {
++ NO_SYNC_WMIFLAG = 0,
++ SYNC_BEFORE_WMIFLAG, /* transmit all queued data before cmd */
++ SYNC_AFTER_WMIFLAG, /* any new data waits until cmd execs */
++ SYNC_BOTH_WMIFLAG,
++ END_WMIFLAG /* end marker */
++} WMI_SYNC_FLAG;
++
++A_STATUS wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
++ WMI_SYNC_FLAG flag);
++A_STATUS wmi_connect_cmd(struct wmi_t *wmip,
++ NETWORK_TYPE netType,
++ DOT11_AUTH_MODE dot11AuthMode,
++ AUTH_MODE authMode,
++ CRYPTO_TYPE pairwiseCrypto,
++ A_UINT8 pairwiseCryptoLen,
++ CRYPTO_TYPE groupCrypto,
++ A_UINT8 groupCryptoLen,
++ int ssidLength,
++ A_UCHAR *ssid,
++ A_UINT8 *bssid,
++ A_UINT16 channel,
++ A_UINT32 ctrl_flags);
++A_STATUS wmi_reconnect_cmd(struct wmi_t *wmip,
++ A_UINT8 *bssid,
++ A_UINT16 channel);
++A_STATUS wmi_disconnect_cmd(struct wmi_t *wmip);
++A_STATUS wmi_getrev_cmd(struct wmi_t *wmip);
++A_STATUS wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType,
++ A_BOOL forceFgScan, A_BOOL isLegacy,
++ A_UINT32 homeDwellTime, A_UINT32 forceScanInterval);
++A_STATUS wmi_scanparams_cmd(struct wmi_t *wmip, A_UINT16 fg_start_sec,
++ A_UINT16 fg_end_sec, A_UINT16 bg_sec,
++ A_UINT16 minact_chdw_msec,
++ A_UINT16 maxact_chdw_msec, A_UINT16 pas_chdw_msec,
++ A_UINT8 shScanRatio, A_UINT8 scanCtrlFlags,
++ A_UINT32 max_dfsch_act_time);
++A_STATUS wmi_bssfilter_cmd(struct wmi_t *wmip, A_UINT8 filter, A_UINT32 ieMask);
++A_STATUS wmi_probedSsid_cmd(struct wmi_t *wmip, A_UINT8 index, A_UINT8 flag,
++ A_UINT8 ssidLength, A_UCHAR *ssid);
++A_STATUS wmi_listeninterval_cmd(struct wmi_t *wmip, A_UINT16 listenInterval, A_UINT16 listenBeacons);
++A_STATUS wmi_bmisstime_cmd(struct wmi_t *wmip, A_UINT16 bmisstime, A_UINT16 bmissbeacons);
++A_STATUS wmi_associnfo_cmd(struct wmi_t *wmip, A_UINT8 ieType,
++ A_UINT8 ieLen, A_UINT8 *ieInfo);
++A_STATUS wmi_powermode_cmd(struct wmi_t *wmip, A_UINT8 powerMode);
++A_STATUS wmi_ibsspmcaps_cmd(struct wmi_t *wmip, A_UINT8 pmEnable, A_UINT8 ttl,
++ A_UINT16 atim_windows, A_UINT16 timeout_value);
++A_STATUS wmi_pmparams_cmd(struct wmi_t *wmip, A_UINT16 idlePeriod,
++ A_UINT16 psPollNum, A_UINT16 dtimPolicy);
++A_STATUS wmi_disctimeout_cmd(struct wmi_t *wmip, A_UINT8 timeout);
++A_STATUS wmi_sync_cmd(struct wmi_t *wmip, A_UINT8 syncNumber);
++A_STATUS wmi_create_pstream_cmd(struct wmi_t *wmip, WMI_CREATE_PSTREAM_CMD *pstream);
++A_STATUS wmi_delete_pstream_cmd(struct wmi_t *wmip, A_UINT8 trafficClass, A_UINT8 streamID);
++A_STATUS wmi_set_bitrate_cmd(struct wmi_t *wmip, A_INT32 rate);
++A_STATUS wmi_get_bitrate_cmd(struct wmi_t *wmip);
++A_INT8 wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate);
++A_STATUS wmi_get_regDomain_cmd(struct wmi_t *wmip);
++A_STATUS wmi_get_channelList_cmd(struct wmi_t *wmip);
++A_STATUS wmi_set_channelParams_cmd(struct wmi_t *wmip, A_UINT8 scanParam,
++ WMI_PHY_MODE mode, A_INT8 numChan,
++ A_UINT16 *channelList);
++
++A_STATUS wmi_set_snr_threshold_params(struct wmi_t *wmip,
++ WMI_SNR_THRESHOLD_PARAMS_CMD *snrCmd);
++A_STATUS wmi_set_rssi_threshold_params(struct wmi_t *wmip,
++ WMI_RSSI_THRESHOLD_PARAMS_CMD *rssiCmd);
++A_STATUS wmi_clr_rssi_snr(struct wmi_t *wmip);
++A_STATUS wmi_set_lq_threshold_params(struct wmi_t *wmip,
++ WMI_LQ_THRESHOLD_PARAMS_CMD *lqCmd);
++A_STATUS wmi_set_rts_cmd(struct wmi_t *wmip, A_UINT16 threshold);
++A_STATUS wmi_set_lpreamble_cmd(struct wmi_t *wmip, A_UINT8 status);
++
++A_STATUS wmi_set_error_report_bitmask(struct wmi_t *wmip, A_UINT32 bitmask);
++
++A_STATUS wmi_get_challenge_resp_cmd(struct wmi_t *wmip, A_UINT32 cookie,
++ A_UINT32 source);
++A_STATUS wmi_config_debug_module_cmd(struct wmi_t *wmip, A_UINT16 mmask,
++ A_UINT16 tsr, A_BOOL rep, A_UINT16 size,
++ A_UINT32 valid);
++A_STATUS wmi_get_stats_cmd(struct wmi_t *wmip);
++A_STATUS wmi_addKey_cmd(struct wmi_t *wmip, A_UINT8 keyIndex,
++ CRYPTO_TYPE keyType, A_UINT8 keyUsage,
++ A_UINT8 keyLength,A_UINT8 *keyRSC,
++ A_UINT8 *keyMaterial, A_UINT8 key_op_ctrl,
++ WMI_SYNC_FLAG sync_flag);
++A_STATUS wmi_add_krk_cmd(struct wmi_t *wmip, A_UINT8 *krk);
++A_STATUS wmi_delete_krk_cmd(struct wmi_t *wmip);
++A_STATUS wmi_deleteKey_cmd(struct wmi_t *wmip, A_UINT8 keyIndex);
++A_STATUS wmi_set_akmp_params_cmd(struct wmi_t *wmip,
++ WMI_SET_AKMP_PARAMS_CMD *akmpParams);
++A_STATUS wmi_get_pmkid_list_cmd(struct wmi_t *wmip);
++A_STATUS wmi_set_pmkid_list_cmd(struct wmi_t *wmip,
++ WMI_SET_PMKID_LIST_CMD *pmkInfo);
++A_STATUS wmi_set_txPwr_cmd(struct wmi_t *wmip, A_UINT8 dbM);
++A_STATUS wmi_get_txPwr_cmd(struct wmi_t *wmip);
++A_STATUS wmi_addBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex, A_UINT8 *bssid);
++A_STATUS wmi_deleteBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex);
++A_STATUS wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, A_BOOL en);
++A_STATUS wmi_setPmkid_cmd(struct wmi_t *wmip, A_UINT8 *bssid, A_UINT8 *pmkId,
++ A_BOOL set);
++A_STATUS wmi_set_access_params_cmd(struct wmi_t *wmip, A_UINT16 txop,
++ A_UINT8 eCWmin, A_UINT8 eCWmax,
++ A_UINT8 aifsn);
++A_STATUS wmi_set_retry_limits_cmd(struct wmi_t *wmip, A_UINT8 frameType,
++ A_UINT8 trafficClass, A_UINT8 maxRetries,
++ A_UINT8 enableNotify);
++
++void wmi_get_current_bssid(struct wmi_t *wmip, A_UINT8 *bssid);
++
++A_STATUS wmi_get_roam_tbl_cmd(struct wmi_t *wmip);
++A_STATUS wmi_get_roam_data_cmd(struct wmi_t *wmip, A_UINT8 roamDataType);
++A_STATUS wmi_set_roam_ctrl_cmd(struct wmi_t *wmip, WMI_SET_ROAM_CTRL_CMD *p,
++ A_UINT8 size);
++A_STATUS wmi_set_powersave_timers_cmd(struct wmi_t *wmip,
++ WMI_POWERSAVE_TIMERS_POLICY_CMD *pCmd,
++ A_UINT8 size);
++
++A_STATUS wmi_set_opt_mode_cmd(struct wmi_t *wmip, A_UINT8 optMode);
++A_STATUS wmi_opt_tx_frame_cmd(struct wmi_t *wmip,
++ A_UINT8 frmType,
++ A_UINT8 *dstMacAddr,
++ A_UINT8 *bssid,
++ A_UINT16 optIEDataLen,
++ A_UINT8 *optIEData);
++
++A_STATUS wmi_set_adhoc_bconIntvl_cmd(struct wmi_t *wmip, A_UINT16 intvl);
++A_STATUS wmi_set_voice_pkt_size_cmd(struct wmi_t *wmip, A_UINT16 voicePktSize);
++A_STATUS wmi_set_max_sp_len_cmd(struct wmi_t *wmip, A_UINT8 maxSpLen);
++A_UINT8 convert_userPriority_to_trafficClass(A_UINT8 userPriority);
++A_UINT8 wmi_get_power_mode_cmd(struct wmi_t *wmip);
++A_STATUS wmi_verify_tspec_params(WMI_CREATE_PSTREAM_CMD *pCmd, A_BOOL tspecCompliance);
++
++#ifdef CONFIG_HOST_TCMD_SUPPORT
++A_STATUS wmi_test_cmd(struct wmi_t *wmip, A_UINT8 *buf, A_UINT32 len);
++#endif
++
++A_STATUS wmi_set_bt_status_cmd(struct wmi_t *wmip, A_UINT8 streamType, A_UINT8 status);
++A_STATUS wmi_set_bt_params_cmd(struct wmi_t *wmip, WMI_SET_BT_PARAMS_CMD* cmd);
++
++
++/*
++ * This function is used to configure the fix rates mask to the target.
++ */
++A_STATUS wmi_set_fixrates_cmd(struct wmi_t *wmip, A_INT16 fixRatesMask);
++A_STATUS wmi_get_ratemask_cmd(struct wmi_t *wmip);
++
++A_STATUS wmi_set_authmode_cmd(struct wmi_t *wmip, A_UINT8 mode);
++
++A_STATUS wmi_set_reassocmode_cmd(struct wmi_t *wmip, A_UINT8 mode);
++
++A_STATUS wmi_set_wmm_cmd(struct wmi_t *wmip, WMI_WMM_STATUS status);
++A_STATUS wmi_set_wmm_txop(struct wmi_t *wmip, WMI_TXOP_CFG txEnable);
++
++A_STATUS wmi_get_keepalive_configured(struct wmi_t *wmip);
++A_UINT8 wmi_get_keepalive_cmd(struct wmi_t *wmip);
++A_STATUS wmi_set_keepalive_cmd(struct wmi_t *wmip, A_UINT8 keepaliveInterval);
++
++A_STATUS wmi_set_appie_cmd(struct wmi_t *wmip, A_UINT8 mgmtFrmType,
++ A_UINT8 ieLen,A_UINT8 *ieInfo);
++
++A_STATUS wmi_set_halparam_cmd(struct wmi_t *wmip, A_UINT8 *cmd, A_UINT16 dataLen);
++A_INT32 wmi_get_rate(A_INT8 rateindex);
++
++/*Wake on Wireless WMI commands*/
++A_STATUS wmi_set_host_sleep_mode_cmd(struct wmi_t *wmip, WMI_SET_HOST_SLEEP_MODE_CMD *cmd);
++A_STATUS wmi_set_wow_mode_cmd(struct wmi_t *wmip, WMI_SET_WOW_MODE_CMD *cmd);
++A_STATUS wmi_get_wow_list_cmd(struct wmi_t *wmip, WMI_GET_WOW_LIST_CMD *cmd);
++A_STATUS wmi_add_wow_pattern_cmd(struct wmi_t *wmip,
++ WMI_ADD_WOW_PATTERN_CMD *cmd, A_UINT8* pattern, A_UINT8* mask, A_UINT8 pattern_size);
++A_STATUS wmi_del_wow_pattern_cmd(struct wmi_t *wmip,
++ WMI_DEL_WOW_PATTERN_CMD *cmd);
++A_STATUS wmi_set_wsc_status_cmd(struct wmi_t *wmip, A_UINT32 status);
++
++bss_t *
++wmi_find_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid,
++ A_UINT32 ssidLength, A_BOOL bIsWPA2);
++
++void
++wmi_node_return (struct wmi_t *wmip, bss_t *bss);
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* _WMI_API_H_ */
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wmix.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/include/wmix.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2004-2005 Atheros Communications Inc.
@@ -23077,53 +23130,10 @@
+#endif
+
+#endif /* _WMIX_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/Makefile
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/miscdrv/common_drv.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/Makefile 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,38 @@
-+REV ?= 2
-+
-+PWD := $(shell pwd)
-+
-+EXTRA_CFLAGS += -I$(src)/include
-+
-+EXTRA_CFLAGS += -DLINUX -DDEBUG -D__KERNEL__ -DHTC_RAW_INTERFACE\
-+ -DTCMD -DSEND_EVENT_TO_APP -DUSER_KEYS \
-+ -DNO_SYNC_FLUSH #\
-+ -DMULTIPLE_FRAMES_PER_INTERRUPT -DAR6000REV$(REV) \
-+ -DBLOCK_TX_PATH_FLAG \
-+ -DSDIO \
-+
-+EXTRA_CFLAGS += -DKERNEL_2_6
-+
-+obj-$(CONFIG_SDIO_AR6000_WLAN) += ar6000.o
-+
-+ar6000-objs += htc/ar6k.o \
-+ htc/ar6k_events.o \
-+ htc/htc_send.o \
-+ htc/htc_recv.o \
-+ htc/htc_services.o \
-+ htc/htc.o \
-+ hif/hif.o \
-+ bmi/bmi.o \
-+ ar6000/ar6000_drv.o \
-+ ar6000/ar6000_raw_if.o \
-+ ar6000/netbuf.o \
-+ ar6000/wireless_ext.o \
-+ ar6000/ioctl.o \
-+ miscdrv/common_drv.o \
-+ miscdrv/credit_dist.o \
-+ wmi/wmi.o \
-+ wlan/wlan_node.o \
-+ wlan/wlan_recv_beacon.o \
-+ wlan/wlan_utils.o
-+
-+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/miscdrv/common_drv.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/miscdrv/common_drv.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/miscdrv/common_drv.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,467 @@
+
+/*
@@ -23592,10 +23602,10 @@
+
+}
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/miscdrv/credit_dist.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/miscdrv/credit_dist.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/miscdrv/credit_dist.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/miscdrv/credit_dist.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,346 @@
+
+/*
@@ -23943,10 +23953,10 @@
+ return A_OK;
+}
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_node.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_node.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_node.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_node.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,371 @@
+/*-
+ * Copyright (c) 2001 Atsushi Onoe
@@ -24319,10 +24329,10 @@
+ wlan_node_dec_free (ni);
+ IEEE80211_NODE_UNLOCK (nt);
+}
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_recv_beacon.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_recv_beacon.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_recv_beacon.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_recv_beacon.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,192 @@
+/*-
+ * Copyright (c) 2001 Atsushi Onoe
@@ -24516,10 +24526,10 @@
+
+ return A_OK;
+}
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_utils.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_utils.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_utils.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wlan/wlan_utils.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2004-2005 Atheros Communications Inc.
@@ -24580,10 +24590,10 @@
+ return 15 + ((freq - 2512) / 20);
+ return (freq - 5000) / 5;
+}
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wmi/wmi.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wmi/wmi.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wmi/wmi.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wmi/wmi.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,3921 @@
+/*
+ * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -28506,10 +28516,10 @@
+ NO_SYNC_WMIFLAG));
+}
+
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wmi/wmi_doc.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wmi/wmi_doc.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wmi/wmi_doc.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wmi/wmi_doc.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,4421 @@
+/*
+ *
@@ -32932,10 +32942,10 @@
+
+=====================================================================
+#endif
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wmi/wmi_host.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wmi/wmi_host.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/ar6000/wmi/wmi_host.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/function/wlan/ar6000/wmi/wmi_host.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,71 @@
+#ifndef _WMI_HOST_H_
+#define _WMI_HOST_H_
@@ -33008,13 +33018,3 @@
+#endif
+
+#endif /* _WMI_HOST_H_ */
-Index: linux-2.6-openmoko/drivers/sdio/function/wlan/Makefile
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/function/wlan/Makefile 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,4 @@
-+#
-+# SDIO wlan ar600 card function driver
-+#
-+obj-$(CONFIG_SDIO_AR6000_WLAN) += ar6000/
-\ No newline at end of file
Modified: developers/sameo/patches/ar6k-atheros-2.0/2.6.24/atheros_2_0_sdio_stack.patch
===================================================================
--- developers/sameo/patches/ar6k-atheros-2.0/2.6.24/atheros_2_0_sdio_stack.patch 2008-01-22 15:34:08 UTC (rev 3920)
+++ developers/sameo/patches/ar6k-atheros-2.0/2.6.24/atheros_2_0_sdio_stack.patch 2008-01-22 16:28:04 UTC (rev 3921)
@@ -8,7 +8,7 @@
drivers/sdio/stack/busdriver/Makefile | 2
drivers/sdio/stack/busdriver/_busdriver.h | 466 +++
drivers/sdio/stack/busdriver/sdio_bus.c | 2120 +++++++++++++++
- drivers/sdio/stack/busdriver/sdio_bus_events.c | 1044 +++++++
+ drivers/sdio/stack/busdriver/sdio_bus_events.c | 1040 +++++++
drivers/sdio/stack/busdriver/sdio_bus_misc.c | 3122 +++++++++++++++++++++++
drivers/sdio/stack/busdriver/sdio_bus_os.c | 832 ++++++
drivers/sdio/stack/busdriver/sdio_function.c | 715 +++++
@@ -26,25 +26,13 @@
include/linux/sdio/sdio_hcd_defs.h | 219 +
include/linux/sdio/sdio_lib.h | 270 +
include/linux/sdio/sdlist.h | 141 +
- 27 files changed, 13745 insertions(+)
+ 27 files changed, 13741 insertions(+)
-Index: linux-2.6-openmoko/drivers/Makefile
+Index: linux-2.6.24-rc8-omoko/arch/arm/Kconfig
===================================================================
---- linux-2.6-openmoko.orig/drivers/Makefile 2008-01-14 13:07:18.000000000 +0100
-+++ linux-2.6-openmoko/drivers/Makefile 2008-01-14 13:07:38.000000000 +0100
-@@ -77,6 +77,7 @@
- obj-$(CONFIG_CPU_FREQ) += cpufreq/
- obj-$(CONFIG_CPU_IDLE) += cpuidle/
- obj-$(CONFIG_MMC) += mmc/
-+obj-$(CONFIG_SDIO) += sdio/
- obj-$(CONFIG_NEW_LEDS) += leds/
- obj-$(CONFIG_INFINIBAND) += infiniband/
- obj-$(CONFIG_SGI_SN) += sn/
-Index: linux-2.6-openmoko/drivers/Kconfig
-===================================================================
---- linux-2.6-openmoko.orig/drivers/Kconfig 2008-01-14 13:07:18.000000000 +0100
-+++ linux-2.6-openmoko/drivers/Kconfig 2008-01-14 13:07:38.000000000 +0100
-@@ -74,6 +74,8 @@
+--- linux-2.6.24-rc8-omoko.orig/arch/arm/Kconfig 2008-01-22 13:32:02.000000000 +0100
++++ linux-2.6.24-rc8-omoko/arch/arm/Kconfig 2008-01-22 13:33:10.000000000 +0100
+@@ -1064,6 +1064,8 @@
source "drivers/usb/Kconfig"
@@ -53,11 +41,11 @@
source "drivers/mmc/Kconfig"
source "drivers/leds/Kconfig"
-Index: linux-2.6-openmoko/arch/arm/Kconfig
+Index: linux-2.6.24-rc8-omoko/drivers/Kconfig
===================================================================
---- linux-2.6-openmoko.orig/arch/arm/Kconfig 2008-01-14 13:07:18.000000000 +0100
-+++ linux-2.6-openmoko/arch/arm/Kconfig 2008-01-14 13:07:38.000000000 +0100
-@@ -1064,6 +1064,8 @@
+--- linux-2.6.24-rc8-omoko.orig/drivers/Kconfig 2008-01-22 13:32:03.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/Kconfig 2008-01-22 13:33:10.000000000 +0100
+@@ -74,6 +74,8 @@
source "drivers/usb/Kconfig"
@@ -66,10 +54,22 @@
source "drivers/mmc/Kconfig"
source "drivers/leds/Kconfig"
-Index: linux-2.6-openmoko/drivers/sdio/Kconfig
+Index: linux-2.6.24-rc8-omoko/drivers/Makefile
===================================================================
+--- linux-2.6.24-rc8-omoko.orig/drivers/Makefile 2008-01-22 13:32:03.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/Makefile 2008-01-22 13:33:10.000000000 +0100
+@@ -77,6 +77,7 @@
+ obj-$(CONFIG_CPU_FREQ) += cpufreq/
+ obj-$(CONFIG_CPU_IDLE) += cpuidle/
+ obj-$(CONFIG_MMC) += mmc/
++obj-$(CONFIG_SDIO) += sdio/
+ obj-$(CONFIG_NEW_LEDS) += leds/
+ obj-$(CONFIG_INFINIBAND) += infiniband/
+ obj-$(CONFIG_SGI_SN) += sn/
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/Kconfig
+===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/Kconfig 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/Kconfig 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,17 @@
+#
+# SDIO driver and host controller support
@@ -88,19 +88,33 @@
+source "drivers/sdio/function/Kconfig"
+
+endmenu
-Index: linux-2.6-openmoko/drivers/sdio/Makefile
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/Makefile 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/Makefile 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,4 @@
+#Makefile for SDIO stack
+obj-$(CONFIG_SDIO) += stack/
+obj-$(CONFIG_SDIO) += hcd/
+obj-$(CONFIG_SDIO) += function/
-Index: linux-2.6-openmoko/drivers/sdio/stack/busdriver/_busdriver.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/busdriver/_busdriver.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/Makefile 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1 @@
++obj-$(CONFIG_SDIO) += busdriver/ lib/
+\ No newline at end of file
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/Makefile 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,2 @@
++obj-$(CONFIG_SDIO) += sdio_busdriver.o
++sdio_busdriver-objs := sdio_bus.o sdio_function.o sdio_bus_misc.o sdio_bus_events.o sdio_bus_os.o
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/_busdriver.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/_busdriver.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,466 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: _busdriver.h
@@ -568,17 +582,10 @@
+ (SDREQ_FLAGS_PSEUDO | SDREQ_FLAGS_BARRIER | SDREQ_FLAGS_TRANS_ASYNC)
+
+#endif /*___BUSDRIVER_H___*/
-Index: linux-2.6-openmoko/drivers/sdio/stack/busdriver/Makefile
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_bus.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/busdriver/Makefile 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,2 @@
-+obj-$(CONFIG_SDIO) += sdio_busdriver.o
-+sdio_busdriver-objs := sdio_bus.o sdio_function.o sdio_bus_misc.o sdio_bus_events.o sdio_bus_os.o
-Index: linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_bus.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_bus.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_bus.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,2120 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_bus.c
@@ -2700,11 +2707,11 @@
+ @see also: SDLIB_IssueConfig
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-Index: linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_bus_events.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_bus_events.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_bus_events.c 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,1044 @@
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_bus_events.c 2008-01-22 16:59:19.000000000 +0100
+@@ -0,0 +1,1040 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_bus_events.c
+
@@ -3419,8 +3426,6 @@
+ return status;
+ }
+ if (pHcd->IrqProcState != SDHCD_IDLE) {
-+ DBG_PRINT(SDDBG_ERROR, ("-SDIO Bus Driver: Already processing interrupts! (state = %d) \n",
-+ pHcd->IrqProcState));
+ status = SDIO_STATUS_ERROR;
+ status2 = _ReleaseHcdLock(pHcd);
+ } else {
@@ -3453,8 +3458,6 @@
+ }
+
+ if (pHcd->IrqProcState != SDHCD_IDLE) {
-+ DBG_PRINT(SDDBG_ERROR, ("-SDIO Bus Driver: Already processing interrupts! (state = %d) \n",
-+ pHcd->IrqProcState));
+ status = SDIO_STATUS_ERROR;
+ } else {
+ /* mark that we are processing */
@@ -3749,10 +3752,10 @@
+ }
+
+}
-Index: linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_bus_misc.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_bus_misc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_bus_misc.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_bus_misc.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,3122 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_bus_misc.c
@@ -6876,10 +6879,10 @@
+ return status;
+}
+
-Index: linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_bus_os.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_bus_os.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_bus_os.c 2008-01-14 13:17:24.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_bus_os.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,832 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_bus_os.c
@@ -7713,10 +7716,10 @@
+EXPORT_SYMBOL(SDIO_CheckResponse);
+EXPORT_SYMBOL(SDIO_RegisterFunction);
+EXPORT_SYMBOL(SDIO_UnregisterFunction);
-Index: linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_function.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_function.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/busdriver/sdio_function.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/busdriver/sdio_function.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,715 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_function.c
@@ -8433,17 +8436,72 @@
+ return status;
+}
+
-Index: linux-2.6-openmoko/drivers/sdio/stack/lib/Makefile
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/lib/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/lib/Makefile 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/lib/Makefile 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,2 @@
+obj-$(CONFIG_SDIO) += sdio_lib.o
+sdio_lib-objs := sdio_lib_c.o sdio_lib_os.o
-Index: linux-2.6-openmoko/drivers/sdio/stack/lib/sdio_lib_c.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/lib/_sdio_lib.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/lib/sdio_lib_c.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/lib/_sdio_lib.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,50 @@
++/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++ at file: _sdio_lib.h
++
++ at abstract: SDIO Lib internal include
++
++#notes:
++
++ at notice: Copyright (c), 2004-2006 Atheros Communications, Inc.
++
++
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation;
++ *
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ *
++ * Portions of this code were developed with information supplied from the
++ * SD Card Association Simplified Specifications. The following conditions and disclaimers may apply:
++ *
++ * The following conditions apply to the release of the SD simplified specification (�Simplified
++ * Specification�) by the SD Card Association. The Simplified Specification is a subset of the complete
++ * SD Specification which is owned by the SD Card Association. This Simplified Specification is provided
++ * on a non-confidential basis subject to the disclaimers below. Any implementation of the Simplified
++ * Specification may require a license from the SD Card Association or other third parties.
++ * Disclaimers:
++ * The information contained in the Simplified Specification is presented only as a standard
++ * specification for SD Cards and SD Host/Ancillary products and is provided "AS-IS" without any
++ * representations or warranties of any kind. No responsibility is assumed by the SD Card Association for
++ * any damages, any infringements of patents or other right of the SD Card Association or any third
++ * parties, which may result from its use. No license is granted by implication, estoppel or otherwise
++ * under any patent or other rights of the SD Card Association or any third party. Nothing herein shall
++ * be construed as an obligation by the SD Card Association to disclose or distribute any technical
++ * information, know-how or other confidential information to any third party.
++ *
++ *
++ * The initial developers of the original code are Seung Yi and Paul Lever
++ *
++ * sdio at atheros.com
++ *
++ *
++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
++#ifndef ___SDIO_LIB_H___
++#define ___SDIO_LIB_H___
++
++#endif /* ___SDIO_LIB_H___*/
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/lib/sdio_lib_c.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/lib/sdio_lib_c.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,908 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_lib_c.c
@@ -9353,65 +9411,10 @@
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+
+
-Index: linux-2.6-openmoko/drivers/sdio/stack/lib/_sdio_lib.h
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/lib/sdio_lib_os.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/lib/_sdio_lib.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,50 @@
-+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-+ at file: _sdio_lib.h
-+
-+ at abstract: SDIO Lib internal include
-+
-+#notes:
-+
-+ at notice: Copyright (c), 2004-2006 Atheros Communications, Inc.
-+
-+
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * Software distributed under the License is distributed on an "AS
-+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+ * implied. See the License for the specific language governing
-+ * rights and limitations under the License.
-+ *
-+ * Portions of this code were developed with information supplied from the
-+ * SD Card Association Simplified Specifications. The following conditions and disclaimers may apply:
-+ *
-+ * The following conditions apply to the release of the SD simplified specification (�Simplified
-+ * Specification�) by the SD Card Association. The Simplified Specification is a subset of the complete
-+ * SD Specification which is owned by the SD Card Association. This Simplified Specification is provided
-+ * on a non-confidential basis subject to the disclaimers below. Any implementation of the Simplified
-+ * Specification may require a license from the SD Card Association or other third parties.
-+ * Disclaimers:
-+ * The information contained in the Simplified Specification is presented only as a standard
-+ * specification for SD Cards and SD Host/Ancillary products and is provided "AS-IS" without any
-+ * representations or warranties of any kind. No responsibility is assumed by the SD Card Association for
-+ * any damages, any infringements of patents or other right of the SD Card Association or any third
-+ * parties, which may result from its use. No license is granted by implication, estoppel or otherwise
-+ * under any patent or other rights of the SD Card Association or any third party. Nothing herein shall
-+ * be construed as an obligation by the SD Card Association to disclose or distribute any technical
-+ * information, know-how or other confidential information to any third party.
-+ *
-+ *
-+ * The initial developers of the original code are Seung Yi and Paul Lever
-+ *
-+ * sdio at atheros.com
-+ *
-+ *
-+
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-+#ifndef ___SDIO_LIB_H___
-+#define ___SDIO_LIB_H___
-+
-+#endif /* ___SDIO_LIB_H___*/
-Index: linux-2.6-openmoko/drivers/sdio/stack/lib/sdio_lib_os.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/lib/sdio_lib_os.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/lib/sdio_lib_os.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,251 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_function_os.c
@@ -9664,25 +9667,18 @@
+EXPORT_SYMBOL(SDLIB_DeleteMessageQueue);
+EXPORT_SYMBOL(SDLIB_PostMessage);
+EXPORT_SYMBOL(SDLIB_GetMessage);
-Index: linux-2.6-openmoko/drivers/sdio/stack/Makefile
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/platform/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/Makefile 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1 @@
-+obj-$(CONFIG_SDIO) += busdriver/ lib/
-\ No newline at end of file
-Index: linux-2.6-openmoko/drivers/sdio/stack/platform/Makefile
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/platform/Makefile 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/platform/Makefile 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,2 @@
+obj-$(CONFIG_SDIO) += sdio_platform.o
+sdio_platform-objs := sdioplatformdriver.o
\ No newline at end of file
-Index: linux-2.6-openmoko/drivers/sdio/stack/platform/sdioplatformdriver.c
+Index: linux-2.6.24-rc8-omoko/drivers/sdio/stack/platform/sdioplatformdriver.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/drivers/sdio/stack/platform/sdioplatformdriver.c 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/drivers/sdio/stack/platform/sdioplatformdriver.c 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,300 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdioplatformdriver.c
@@ -9984,10 +9980,653 @@
+
+
+
-Index: linux-2.6-openmoko/include/linux/sdio/ctsystem.h
+Index: linux-2.6.24-rc8-omoko/include/linux/sdio/_sdio_defs.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/include/linux/sdio/ctsystem.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/include/linux/sdio/_sdio_defs.h 2008-01-22 13:33:10.000000000 +0100
+@@ -0,0 +1,638 @@
++/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++ at file: _sdio_defs.h
++
++ at abstract: SD/SDIO definitions
++
++ at notice: Copyright (c), 2004-2006 Atheros Communications, Inc.
++
++
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation;
++ *
++ * Software distributed under the License is distributed on an "AS
++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
++ * implied. See the License for the specific language governing
++ * rights and limitations under the License.
++ *
++ * Portions of this code were developed with information supplied from the
++ * SD Card Association Simplified Specifications. The following conditions and disclaimers may apply:
++ *
++ * The following conditions apply to the release of the SD simplified specification (�Simplified
++ * Specification�) by the SD Card Association. The Simplified Specification is a subset of the complete
++ * SD Specification which is owned by the SD Card Association. This Simplified Specification is provided
++ * on a non-confidential basis subject to the disclaimers below. Any implementation of the Simplified
++ * Specification may require a license from the SD Card Association or other third parties.
++ * Disclaimers:
++ * The information contained in the Simplified Specification is presented only as a standard
++ * specification for SD Cards and SD Host/Ancillary products and is provided "AS-IS" without any
++ * representations or warranties of any kind. No responsibility is assumed by the SD Card Association for
++ * any damages, any infringements of patents or other right of the SD Card Association or any third
++ * parties, which may result from its use. No license is granted by implication, estoppel or otherwise
++ * under any patent or other rights of the SD Card Association or any third party. Nothing herein shall
++ * be construed as an obligation by the SD Card Association to disclose or distribute any technical
++ * information, know-how or other confidential information to any third party.
++ *
++ *
++ * The initial developers of the original code are Seung Yi and Paul Lever
++ *
++ * sdio at atheros.com
++ *
++ *
++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
++#ifndef ___SDIO_DEFS_H___
++#define ___SDIO_DEFS_H___
++
++#define SD_INIT_BUS_CLOCK 100000 /* initialization clock in hz */
++#define SPI_INIT_BUS_CLOCK 100000 /* initialization clock in hz */
++#define SD_MAX_BUS_CLOCK 25000000 /* max clock speed in hz */
++#define SD_HS_MAX_BUS_CLOCK 50000000 /* SD high speed max clock speed in hz */
++#define SDIO_LOW_SPEED_MAX_BUS_CLOCK 400000 /* max low speed clock in hz */
++#define SDMMC_MIN_INIT_CLOCKS 80 /* minimun number of initialization clocks */
++#define SDIO_EMPC_CURRENT_THRESHOLD 300 /* SDIO 1.10 , EMPC (mA) threshold, we add some overhead */
++
++/* commands */
++#define CMD0 0
++#define CMD1 1
++#define CMD2 2
++#define CMD3 3
++#define CMD4 4
++#define CMD5 5
++#define CMD6 6
++#define CMD7 7
++#define CMD9 9
++#define CMD10 10
++#define CMD12 12
++#define CMD13 13
++#define CMD15 15
++#define CMD16 16
++#define CMD17 17
++#define CMD18 18
++#define CMD24 24
++#define CMD25 25
++#define CMD27 27
++#define CMD28 28
++#define CMD29 29
++#define CMD30 30
++#define CMD32 32
++#define CMD33 33
++#define CMD38 38
++#define CMD42 42
++#define CMD52 52
++#define CMD53 53
++#define CMD55 55
++#define CMD56 56
++#define CMD58 58
++#define CMD59 59
++#define ACMD6 6
++#define ACMD13 13
++#define ACMD22 22
++#define ACMD23 23
++#define ACMD41 41
++#define ACMD42 42
++#define ACMD51 51
++
++#define SD_ACMD6_BUS_WIDTH_1_BIT 0x00
++#define SD_ACMD6_BUS_WIDTH_4_BIT 0x02
++
++#define SD_CMD59_CRC_OFF 0x00000000
++#define SD_CMD59_CRC_ON 0x00000001
++
++/* SD/SPI max response size */
++#define SD_MAX_CMD_RESPONSE_BYTES SD_R2_RESPONSE_BYTES
++
++#define SD_R1_RESPONSE_BYTES 6
++#define SD_R1B_RESPONSE_BYTES SD_R1_RESPONSE_BYTES
++#define SD_R1_GET_CMD(pR) ((pR)[5] & 0xC0))
++#define SD_R1_SET_CMD(pR,cmd) (pR)[5] = (cmd) & 0xC0
++#define SD_R1_GET_CARD_STATUS(pR) (((UINT32)((pR)[1])) | \
++ (((UINT32)((pR)[2])) << 8) | \
++ (((UINT32)((pR)[3])) << 16) | \
++ (((UINT32)((pR)[4])) << 24) )
++#define SD_R1_SET_CMD_STATUS(pR,status) \
++{ \
++ (pR)[1] = (UINT8)(status); \
++ (pR)[2] = (UINT8)((status) >> 8); \
++ (pR)[3] = (UINT8)((status) >> 16); \
++ (pR)[4] = (UINT8)((status) >> 24); \
++}
++
++/* SD R1 card status bit masks */
++#define SD_CS_CMD_OUT_OF_RANGE ((UINT32)(1 << 31))
++#define SD_CS_ADDRESS_ERR (1 << 30)
++#define SD_CS_BLK_LEN_ERR (1 << 29)
++#define SD_CS_ERASE_SEQ_ERR (1 << 28)
++#define SD_CS_ERASE_PARAM_ERR (1 << 27)
++#define SD_CS_WP_ERR (1 << 26)
++#define SD_CS_CARD_LOCKED (1 << 25)
++#define SD_CS_LK_UNLK_FAILED (1 << 24)
++#define SD_CS_PREV_CMD_CRC_ERR (1 << 23)
++#define SD_CS_ILLEGAL_CMD_ERR (1 << 22)
++#define SD_CS_ECC_FAILED (1 << 21)
++#define SD_CS_CARD_INTERNAL_ERR (1 << 20)
++#define SD_CS_GENERAL_ERR (1 << 19)
++#define SD_CS_CSD_OVERWR_ERR (1 << 16)
++#define SD_CS_WP_ERASE_SKIP (1 << 15)
++#define SD_CS_ECC_DISABLED (1 << 14)
++#define SD_CS_ERASE_RESET (1 << 13)
++#define SD_CS_GET_STATE(status) (((status) >> 9) & 0x0f)
++#define SD_CS_SET_STATE(status, state) \
++{ \
++ (status) &= ~(0x0F << 9); \
++ (status) |= (state) << 9 \
++}
++
++#define SD_CS_TRANSFER_ERRORS \
++ ( SD_CS_ADDRESS_ERR | \
++ SD_CS_BLK_LEN_ERR | \
++ SD_CS_ERASE_SEQ_ERR | \
++ SD_CS_ERASE_PARAM_ERR | \
++ SD_CS_WP_ERR | \
++ SD_CS_ECC_FAILED | \
++ SD_CS_CARD_INTERNAL_ERR | \
++ SD_CS_GENERAL_ERR )
++
++#define SD_CS_STATE_IDLE 0
++#define SD_CS_STATE_READY 1
++#define SD_CS_STATE_IDENT 2
++#define SD_CS_STATE_STBY 3
++#define SD_CS_STATE_TRANS 4
++#define SD_CS_STATE_DATA 5
++#define SD_CS_STATE_RCV 6
++#define SD_CS_STATE_PRG 7
++#define SD_CS_STATE_DIS 8
++#define SD_CS_READY_FOR_DATA (1 << 8)
++#define SD_CS_APP_CMD (1 << 5)
++#define SD_CS_AKE_SEQ_ERR (1 << 3)
++
++/* SD R2 response */
++#define SD_R2_RESPONSE_BYTES 17
++#define MAX_CSD_CID_BYTES 16
++#define SD_R2_SET_STUFF_BITS(pR) (pR)[16] = 0x3F
++#define GET_SD_CSD_TRANS_SPEED(pR) (pR)[12]
++#define GET_SD_CID_MANFID(pR) (pR)[15]
++#define GET_SD_CID_PN_1(pR) (pR)[12]
++#define GET_SD_CID_PN_2(pR) (pR)[11]
++#define GET_SD_CID_PN_3(pR) (pR)[10]
++#define GET_SD_CID_PN_4(pR) (pR)[9]
++#define GET_SD_CID_PN_5(pR) (pR)[8]
++#define GET_SD_CID_PN_6(pR) (pR)[7]
++
++#define GET_SD_CID_OEMID(pR) ((((UINT16)(pR)[14]) << 8 )| (UINT16)((pR)[13]))
++#define SDMMC_OCR_VOLTAGE_MASK 0x7FFFFFFF
++/* SD R3 response */
++#define SD_R3_RESPONSE_BYTES 6
++#define SD_R3_GET_OCR(pR) ((((UINT32)((pR)[1])) | \
++ (((UINT32)((pR)[2])) << 8) | \
++ (((UINT32)((pR)[3])) << 16) | \
++ (((UINT32)((pR)[4])) << 24)) & SDMMC_OCR_VOLTAGE_MASK)
++#define SD_R3_IS_CARD_READY(pR) (((pR)[4] & 0x80) == 0x80)
++
++/* OCR bit definitions */
++#define SD_OCR_CARD_PWR_UP_STATUS ((UINT32)(1 << 31))
++#define SD_OCR_3_5_TO_3_6_VDD (1 << 23)
++#define SD_OCR_3_4_TO_3_5_VDD (1 << 22)
++#define SD_OCR_3_3_TO_3_4_VDD (1 << 21)
++#define SD_OCR_3_2_TO_3_3_VDD (1 << 20)
++#define SD_OCR_3_1_TO_3_2_VDD (1 << 19)
++#define SD_OCR_3_0_TO_3_1_VDD (1 << 18)
++#define SD_OCR_2_9_TO_3_0_VDD (1 << 17)
++#define SD_OCR_2_8_TO_2_9_VDD (1 << 16)
++#define SD_OCR_2_7_TO_2_8_VDD (1 << 15)
++#define SD_OCR_2_6_TO_2_7_VDD (1 << 14)
++#define SD_OCR_2_5_TO_2_6_VDD (1 << 13)
++#define SD_OCR_2_4_TO_2_5_VDD (1 << 12)
++#define SD_OCR_2_3_TO_2_4_VDD (1 << 11)
++#define SD_OCR_2_2_TO_2_3_VDD (1 << 10)
++#define SD_OCR_2_1_TO_2_2_VDD (1 << 9)
++#define SD_OCR_2_0_TO_2_1_VDD (1 << 8)
++#define SD_OCR_1_9_TO_2_0_VDD (1 << 7)
++#define SD_OCR_1_8_TO_1_9_VDD (1 << 6)
++#define SD_OCR_1_7_TO_1_8_VDD (1 << 5)
++#define SD_OCR_1_6_TO_1_7_VDD (1 << 4)
++
++/* SD Status data block */
++#define SD_STATUS_DATA_BYTES 64
++#define SDS_GET_DATA_WIDTH(buffer) ((buffer)[0] & 0xC0)
++#define SDS_BUS_1_BIT 0x00
++#define SDS_BUS_4_BIT 0x80
++#define SDS_GET_SECURE_MODE(buffer) ((buffer)[0] & 0x20)
++#define SDS_CARD_SECURE_MODE 0x20
++#define SDS_GET_CARD_TYPE(buffer) ((buffer)[60] & 0x0F)
++#define SDS_SD_CARD_RW 0x00
++#define SDS_SD_CARD_ROM 0x01
++
++/* SD R6 response */
++#define SD_R6_RESPONSE_BYTES 6
++#define SD_R6_GET_RCA(pR) ((UINT16)((pR)[3]) | (((UINT16)((pR)[4])) << 8))
++#define SD_R6_GET_CS(pR) ((UINT16)((pR)[1]) | (((UINT16)((pR)[2])) << 8))
++
++/* SD Configuration Register (SCR) */
++#define SD_SCR_BYTES 8
++#define SCR_REV_1_0 0x00
++#define SCR_SD_SPEC_1_00 0x00
++#define SCR_SD_SPEC_1_10 0x01
++#define SCR_BUS_SUPPORTS_1_BIT 0x01
++#define SCR_BUS_SUPPORTS_4_BIT 0x04
++#define SCR_SD_SECURITY_MASK 0x70
++#define SCR_SD_NO_SECURITY 0x00
++#define SCR_SD_SECURITY_1_0 0x10
++#define SCR_SD_SECURITY_2_0 0x20
++#define SCR_DATA_STATUS_1_AFTER_ERASE 0x80
++
++#define GET_SD_SCR_STRUCT_VER(pB) ((pB)[7] >> 4)
++#define GET_SD_SCR_SDSPEC_VER(pB) ((pB)[7] & 0x0F)
++#define GET_SD_SCR_BUSWIDTHS(pB) ((pB)[6] & 0x0F)
++#define GET_SD_SCR_BUSWIDTHS_FLAGS(pB) (pB)[6]
++#define GET_SD_SCR_SECURITY(pB) (((pB)[6] >> 4) & 0x07)
++#define GET_SD_SCR_DATA_STAT_AFTER_ERASE(pB) (((pB)[6] >> 7) & 0x01)
++
++/* SDIO R4 Response */
++#define SD_SDIO_R4_RESPONSE_BYTES 6
++#define SD_SDIO_R4_GET_OCR(pR) ((UINT32)((pR)[1]) | \
++ (((UINT32)(pR)[2]) << 8) | \
++ (((UINT32)(pR)[3]) << 16))
++#define SD_SDIO_R4_IS_MEMORY_PRESENT(pR) (((pR)[4] & 0x08) == 0x08)
++#define SD_SDIO_R4_GET_IO_FUNC_COUNT(pR) (((pR)[4] >> 4) & 0x07)
++#define SD_SDIO_R4_IS_CARD_READY(pR) (((pR)[4] & 0x80) == 0x80)
++
++/* SDIO R5 response */
++#define SD_SDIO_R5_RESPONSE_BYTES 6
++#define SD_SDIO_R5_READ_DATA_OFFSET 1
++#define SD_R5_GET_READ_DATA(pR) (pR)[SD_SDIO_R5_READ_DATA_OFFSET]
++#define SD_R5_RESP_FLAGS_OFFSET 2
++#define SD_R5_GET_RESP_FLAGS(pR) (pR)[SD_R5_RESP_FLAGS_OFFSET]
++#define SD_R5_SET_CMD(pR,cmd) (pR)[5] = (cmd) & 0xC0
++#define SD_R5_RESP_CMD_ERR (1 << 7) /* for previous cmd */
++#define SD_R5_ILLEGAL_CMD (1 << 6)
++#define SD_R5_GENERAL_ERR (1 << 3)
++#define SD_R5_INVALID_FUNC (1 << 1)
++#define SD_R5_ARG_RANGE_ERR (1 << 0)
++#define SD_R5_CURRENT_CMD_ERRORS (SD_R5_ILLEGAL_CMD | SD_R5_GENERAL_ERR \
++ | SD_R5_INVALID_FUNC | SD_R5_ARG_RANGE_ERR)
++#define SD_R5_ERRORS (SD_R5_CURRENT_CMD_ERRORS)
++
++#define SD_R5_GET_IO_STATE(pR) (((pR)[2] >> 4) & 0x03)
++#define SD_R5_STATE_DIS 0x00
++#define SD_R5_STATE_CMD 0x01
++#define SD_R5_STATE_TRN 0x02
++
++/* SDIO Modified R6 Response */
++#define SD_SDIO_R6_RESPONSE_BYTES 6
++#define SD_SDIO_R6_GET_RCA(pR) ((UINT16)((pR)[3]) | ((UINT16)((pR)[4]) << 8))
++#define SD_SDIO_R6_GET_CSTAT(pR)((UINT16)((pR)[1]) | ((UINT16)((pR)[2]) << 8))
++
++/* SPI mode R1 response */
++#define SPI_R1_RESPONSE_BYTES 1
++#define GET_SPI_R1_RESP_TOKEN(pR) (pR)[0]
++#define SPI_CS_STATE_IDLE 0x01
++#define SPI_CS_ERASE_RESET (1 << 1)
++#define SPI_CS_ILLEGAL_CMD (1 << 2)
++#define SPI_CS_CMD_CRC_ERR (1 << 3)
++#define SPI_CS_ERASE_SEQ_ERR (1 << 4)
++#define SPI_CS_ADDRESS_ERR (1 << 5)
++#define SPI_CS_PARAM_ERR (1 << 6)
++#define SPI_CS_ERR_MASK 0x7c
++
++/* SPI mode R2 response */
++#define SPI_R2_RESPONSE_BYTES 2
++#define GET_SPI_R2_RESP_TOKEN(pR) (pR)[1]
++#define GET_SPI_R2_STATUS_TOKEN(pR) (pR)[0]
++/* the first response byte is defined above */
++/* the second response byte is defined below */
++#define SPI_CS_CARD_IS_LOCKED (1 << 0)
++#define SPI_CS_LOCK_UNLOCK_FAILED (1 << 1)
++#define SPI_CS_ERROR (1 << 2)
++#define SPI_CS_INTERNAL_ERROR (1 << 3)
++#define SPI_CS_ECC_FAILED (1 << 4)
++#define SPI_CS_WP_VIOLATION (1 << 5)
++#define SPI_CS_ERASE_PARAM_ERR (1 << 6)
++#define SPI_CS_OUT_OF_RANGE (1 << 7)
++
++/* SPI mode R3 response */
++#define SPI_R3_RESPONSE_BYTES 5
++#define SPI_R3_GET_OCR(pR) ((((UINT32)((pR)[0])) | \
++ (((UINT32)((pR)[1])) << 8) | \
++ (((UINT32)((pR)[2])) << 16) | \
++ (((UINT32)((pR)[3])) << 24)) & SDMMC_OCR_VOLTAGE_MASK)
++#define SPI_R3_IS_CARD_READY(pR) (((pR)[3] & 0x80) == 0x80)
++#define GET_SPI_R3_RESP_TOKEN(pR) (pR)[4]
++
++/* SPI mode SDIO R4 response */
++#define SPI_SDIO_R4_RESPONSE_BYTES 5
++#define SPI_SDIO_R4_GET_OCR(pR) ((UINT32)((pR)[0]) | \
++ (((UINT32)(pR)[1]) << 8) | \
++ (((UINT32)(pR)[2]) << 16))
++#define SPI_SDIO_R4_IS_MEMORY_PRESENT(pR) (((pR)[3] & 0x08) == 0x08)
++#define SPI_SDIO_R4_GET_IO_FUNC_COUNT(pR) (((pR)[3] >> 4) & 0x07)
++#define SPI_SDIO_R4_IS_CARD_READY(pR) (((pR)[3] & 0x80) == 0x80)
++#define GET_SPI_SDIO_R4_RESP_TOKEN(pR) (pR)[4]
++
++/* SPI Mode SDIO R5 response */
++#define SPI_SDIO_R5_RESPONSE_BYTES 2
++#define GET_SPI_SDIO_R5_RESP_TOKEN(pR) (pR)[1]
++#define GET_SPI_SDIO_R5_RESPONSE_RDATA(pR) (pR)[0]
++#define SPI_R5_IDLE_STATE 0x01
++#define SPI_R5_ILLEGAL_CMD (1 << 2)
++#define SPI_R5_CMD_CRC (1 << 3)
++#define SPI_R5_FUNC_ERR (1 << 4)
++#define SPI_R5_PARAM_ERR (1 << 6)
++
++/* SDIO COMMAND 52 Definitions */
++#define CMD52_READ 0
++#define CMD52_WRITE 1
++#define CMD52_READ_AFTER_WRITE 1
++#define CMD52_NORMAL_WRITE 0
++#define SDIO_SET_CMD52_ARG(arg,rw,func,raw,address,writedata) \
++ (arg) = (((rw) & 1) << 31) | \
++ (((func) & 0x7) << 28) | \
++ (((raw) & 1) << 27) | \
++ (1 << 26) | \
++ (((address) & 0x1FFFF) << 9) | \
++ (1 << 8) | \
++ ((writedata) & 0xFF)
++#define SDIO_SET_CMD52_READ_ARG(arg,func,address) \
++ SDIO_SET_CMD52_ARG(arg,CMD52_READ,(func),0,address,0x00)
++#define SDIO_SET_CMD52_WRITE_ARG(arg,func,address,value) \
++ SDIO_SET_CMD52_ARG(arg,CMD52_WRITE,(func),CMD52_NORMAL_WRITE,address,value)
++
++/* SDIO COMMAND 53 Definitions */
++#define CMD53_READ 0
++#define CMD53_WRITE 1
++#define CMD53_BLOCK_BASIS 1
++#define CMD53_BYTE_BASIS 0
++#define CMD53_FIXED_ADDRESS 0
++#define CMD53_INCR_ADDRESS 1
++#define SDIO_SET_CMD53_ARG(arg,rw,func,mode,opcode,address,bytes_blocks) \
++ (arg) = (((rw) & 1) << 31) | \
++ (((func) & 0x7) << 28) | \
++ (((mode) & 1) << 27) | \
++ (((opcode) & 1) << 26) | \
++ (((address) & 0x1FFFF) << 9) | \
++ ((bytes_blocks) & 0x1FF)
++
++#define SDIO_MAX_LENGTH_BYTE_BASIS 512
++#define SDIO_MAX_BLOCKS_BLOCK_BASIS 511
++#define SDIO_MAX_BYTES_PER_BLOCK 2048
++#define SDIO_COMMON_AREA_FUNCTION_NUMBER 0
++#define SDIO_FIRST_FUNCTION_NUMBER 1
++#define SDIO_LAST_FUNCTION_NUMBER 7
++
++#define CMD53_CONVERT_BYTE_BASIS_BLK_LENGTH_PARAM(b) (((b) < SDIO_MAX_LENGTH_BYTE_BASIS) ? (b) : 0)
++#define CMD53_CONVERT_BLOCK_BASIS_BLK_COUNT_PARAM(b) (((b) <= SDIO_MAX_BLOCKS_BLOCK_BASIS) ? (b) : 0)
++
++
++/* SDIO COMMON Registers */
++
++/* revision register */
++#define CCCR_SDIO_REVISION_REG 0x00
++#define CCCR_REV_MASK 0x0F
++#define CCCR_REV_1_0 0x00
++#define CCCR_REV_1_1 0x01
++#define SDIO_REV_MASK 0xF0
++#define SDIO_REV_1_00 0x00
++#define SDIO_REV_1_10 0x10
++#define SDIO_REV_1_20 0x20
++/* SD physical spec revision */
++#define SD_SPEC_REVISION_REG 0x01
++#define SD_REV_MASK 0x0F
++#define SD_REV_1_01 0x00
++#define SD_REV_1_10 0x01
++/* I/O Enable */
++#define SDIO_ENABLE_REG 0x02
++/* I/O Ready */
++#define SDIO_READY_REG 0x03
++/* Interrupt Enable */
++#define SDIO_INT_ENABLE_REG 0x04
++#define SDIO_INT_MASTER_ENABLE 0x01
++#define SDIO_INT_ALL_ENABLE 0xFE
++/* Interrupt Pending */
++#define SDIO_INT_PENDING_REG 0x05
++#define SDIO_INT_PEND_MASK 0xFE
++/* I/O Abort */
++#define SDIO_IO_ABORT_REG 0x06
++#define SDIO_IO_RESET (1 << 3)
++/* Bus Interface */
++#define SDIO_BUS_IF_REG 0x07
++#define CARD_DETECT_DISABLE 0x80
++#define SDIO_BUS_WIDTH_1_BIT 0x00
++#define SDIO_BUS_WIDTH_4_BIT 0x02
++/* Card Capabilities */
++#define SDIO_CARD_CAPS_REG 0x08
++#define SDIO_CAPS_CMD52_WHILE_DATA 0x01 /* card can issue CMD52 while data transfer */
++#define SDIO_CAPS_MULTI_BLOCK 0x02 /* card supports multi-block data transfers */
++#define SDIO_CAPS_READ_WAIT 0x04 /* card supports read-wait protocol */
++#define SDIO_CAPS_SUSPEND_RESUME 0x08 /* card supports I/O function suspend/resume */
++#define SDIO_CAPS_INT_MULTI_BLK 0x10 /* interrupts between multi-block data capable */
++#define SDIO_CAPS_ENB_INT_MULTI_BLK 0x20 /* enable ints between muli-block data */
++#define SDIO_CAPS_LOW_SPEED 0x40 /* low speed card */
++#define SDIO_CAPS_4BIT_LS 0x80 /* 4 bit low speed card */
++/* Common CIS pointer */
++#define SDIO_CMN_CIS_PTR_LOW_REG 0x09
++#define SDIO_CMN_CIS_PTR_MID_REG 0x0a
++#define SDIO_CMN_CIS_PTR_HI_REG 0x0b
++/* Bus suspend */
++#define SDIO_BUS_SUSPEND_REG 0x0c
++#define SDIO_FUNC_SUSPEND_STATUS_MASK 0x01 /* selected function is suspended */
++#define SDIO_SUSPEND_FUNCTION 0x02 /* suspend the current selected function */
++/* Function select (for bus suspension) */
++#define SDIO_FUNCTION_SELECT_REG 0x0d
++#define SDIO_SUSPEND_FUNCTION_0 0x00
++#define SDIO_SUSPEND_MEMORY_FUNC_MASK 0x08
++/* Function Execution */
++#define SDIO_FUNCTION_EXEC_REG 0x0e
++#define SDIO_MEMORY_FUNC_EXEC_MASK 0x01
++/* Function Ready */
++#define SDIO_FUNCTION_READY_REG 0x0f
++#define SDIO_MEMORY_FUNC_BUSY_MASK 0x01
++
++/* power control 1.10 only */
++#define SDIO_POWER_CONTROL_REG 0x12
++#define SDIO_POWER_CONTROL_SMPC 0x01
++#define SDIO_POWER_CONTROL_EMPC 0x02
++
++/* high speed control , 1.20 only */
++#define SDIO_HS_CONTROL_REG 0x13
++#define SDIO_HS_CONTROL_SHS 0x01
++#define SDIO_HS_CONTROL_EHS 0x02
++
++/* Function Base Registers */
++#define xFUNCTION_FBR_OFFSET(funcNo) (0x100*(funcNo))
++/* offset calculation that does not use multiplication */
++static INLINE UINT32 CalculateFBROffset(UCHAR FuncNo) {
++ UCHAR i = FuncNo;
++ UINT32 offset = 0;
++ while (i) {
++ offset += 0x100;
++ i--;
++ }
++ return offset;
++}
++/* Function info */
++#define FBR_FUNC_INFO_REG_OFFSET(fbr) ((fbr) + 0x00)
++#define FUNC_INFO_SUPPORTS_CSA_MASK 0x40
++#define FUNC_INFO_ENABLE_CSA 0x80
++#define FUNC_INFO_DEVICE_CODE_MASK 0x0F
++#define FUNC_INFO_DEVICE_CODE_LAST 0x0F
++#define FBR_FUNC_EXT_DEVICE_CODE_OFFSET(fbr) ((fbr) + 0x01)
++/* Function Power selection */
++#define FBR_FUNC_POWER_SELECT_OFFSET(fbr) ((fbr) + 0x02)
++#define FUNC_POWER_SELECT_SPS 0x01
++#define FUNC_POWER_SELECT_EPS 0x02
++/* Function CIS ptr */
++#define FBR_FUNC_CIS_LOW_OFFSET(fbr) ((fbr) + 0x09)
++#define FBR_FUNC_CIS_MID_OFFSET(fbr) ((fbr) + 0x0a)
++#define FBR_FUNC_CIS_HI_OFFSET(fbr) ((fbr) + 0x0b)
++/* Function CSA ptr */
++#define FBR_FUNC_CSA_LOW_OFFSET(fbr) ((fbr) + 0x0c)
++#define FBR_FUNC_CSA_MID_OFFSET(fbr) ((fbr) + 0x0d)
++#define FBR_FUNC_CSA_HI_OFFSET(fbr) ((fbr) + 0x0e)
++/* Function CSA data window */
++#define FBR_FUNC_CSA_DATA_OFFSET(fbr) ((fbr) + 0x0f)
++/* Function Block Size Control */
++#define FBR_FUNC_BLK_SIZE_LOW_OFFSET(fbr) ((fbr) + 0x10)
++#define FBR_FUNC_BLK_SIZE_HI_OFFSET(fbr) ((fbr) + 0x11)
++#define SDIO_CIS_AREA_BEGIN 0x00001000
++#define SDIO_CIS_AREA_END 0x00017fff
++/* Tuple definitions */
++#define CISTPL_NULL 0x00
++#define CISTPL_CHECKSUM 0x10
++#define CISTPL_VERS_1 0x15
++#define CISTPL_ALTSTR 0x16
++#define CISTPL_MANFID 0x20
++#define CISTPL_FUNCID 0x21
++#define CISTPL_FUNCE 0x22
++#define CISTPL_VENDOR 0x91
++#define CISTPL_END 0xff
++#define CISTPL_LINK_END 0xff
++
++
++/* these structures must be packed */
++
++/* Manufacturer ID tuple */
++struct SDIO_MANFID_TPL {
++ UINT16 ManufacturerCode; /* jedec code */
++ UINT16 ManufacturerInfo; /* manufacturer specific code */
++}CT_PACK_STRUCT;
++
++/* Function ID Tuple */
++struct SDIO_FUNC_ID_TPL {
++ UINT8 DeviceCode; /* device code */
++ UINT8 InitMask; /* system initialization mask (not used) */
++}CT_PACK_STRUCT;
++
++ /* Extended Function Tuple (Common) */
++struct SDIO_FUNC_EXT_COMMON_TPL {
++ UINT8 Type; /* type */
++ UINT16 Func0_MaxBlockSize; /* max function 0 block transfer size */
++ UINT8 MaxTransSpeed; /* max transfer speed (encoded) */
++#define TRANSFER_UNIT_MULTIPIER_MASK 0x07
++#define TIME_VALUE_MASK 0x78
++#define TIME_VALUE_SHIFT 3
++}CT_PACK_STRUCT;
++
++/* Extended Function Tuple (Per Function) */
++struct SDIO_FUNC_EXT_FUNCTION_TPL {
++ UINT8 Type; /* type */
++#define SDIO_FUNC_INFO_WAKEUP_SUPPORT 0x01
++ UINT8 FunctionInfo; /* function info */
++ UINT8 SDIORev; /* revision */
++ UINT32 CardPSN; /* product serial number */
++ UINT32 CSASize; /* CSA size */
++ UINT8 CSAProperties; /* CSA properties */
++ UINT16 MaxBlockSize; /* max block size for block transfers */
++ UINT32 FunctionOCR; /* optimal function OCR */
++ UINT8 OpMinPwr; /* operational min power */
++ UINT8 OpAvgPwr; /* operational average power */
++ UINT8 OpMaxPwr; /* operation maximum power */
++ UINT8 SbMinPwr; /* standby minimum power */
++ UINT8 SbAvgPwr; /* standby average power */
++ UINT8 SbMaxPwr; /* standby maximum power */
++ UINT16 MinBandWidth; /* minimum bus bandwidth */
++ UINT16 OptBandWidth; /* optimalbus bandwitdh */
++}CT_PACK_STRUCT;
++
++struct SDIO_FUNC_EXT_FUNCTION_TPL_1_1 {
++ struct SDIO_FUNC_EXT_FUNCTION_TPL CommonInfo; /* from 1.0*/
++ UINT16 EnableTimeOut; /* timeout for enable */
++ UINT16 OperPwrMaxPwr;
++ UINT16 OperPwrAvgPwr;
++ UINT16 HiPwrMaxPwr;
++ UINT16 HiPwrAvgPwr;
++ UINT16 LowPwrMaxPwr;
++ UINT16 LowPwrAvgPwr;
++}CT_PACK_STRUCT;
++
++static INLINE SDIO_STATUS ConvertCMD52ResponseToSDIOStatus(UINT8 CMD52ResponseFlags) {
++ if (!(CMD52ResponseFlags & SD_R5_ERRORS)) {
++ return SDIO_STATUS_SUCCESS;
++ }
++ if (CMD52ResponseFlags & SD_R5_ILLEGAL_CMD) {
++ return SDIO_STATUS_DATA_STATE_INVALID;
++ } else if (CMD52ResponseFlags & SD_R5_INVALID_FUNC) {
++ return SDIO_STATUS_INVALID_FUNC;
++ } else if (CMD52ResponseFlags & SD_R5_ARG_RANGE_ERR) {
++ return SDIO_STATUS_FUNC_ARG_ERROR;
++ } else {
++ return SDIO_STATUS_DATA_ERROR_UNKNOWN;
++ }
++}
++
++/* CMD6 mode switch definitions */
++
++#define SD_SWITCH_FUNC_CHECK 0
++#define SD_SWITCH_FUNC_SET ((UINT32)(1 << 31))
++#define SD_FUNC_NO_SELECT_MASK 0x00FFFFFF
++#define SD_SWITCH_GRP_1 0
++#define SD_SWITCH_GRP_2 1
++#define SD_SWITCH_GRP_3 2
++#define SD_SWITCH_GRP_4 3
++#define SD_SWITCH_GRP_5 4
++#define SD_SWITCH_GRP_6 5
++
++#define SD_SWITCH_HIGH_SPEED_GROUP SD_SWITCH_GRP_1
++#define SD_SWITCH_HIGH_SPEED_FUNC_NO 1
++
++#define SD_SWITCH_MAKE_SHIFT(grp) ((grp) * 4)
++
++#define SD_SWITCH_MAKE_GRP_PATTERN(FuncGrp,FuncNo) \
++ ((SD_FUNC_NO_SELECT_MASK & (~(0xF << SD_SWITCH_MAKE_SHIFT(FuncGrp)))) | \
++ (((FuncNo) & 0xF) << SD_SWITCH_MAKE_SHIFT(FuncGrp))) \
++
++#define SD_SWITCH_FUNC_ARG_GROUP_CHECK(FuncGrp,FuncNo) \
++ (SD_SWITCH_FUNC_CHECK | SD_SWITCH_MAKE_GRP_PATTERN(FuncGrp,FuncNo))
++
++#define SD_SWITCH_FUNC_ARG_GROUP_SET(FuncGrp,FuncNo) \
++ (SD_SWITCH_FUNC_SET | SD_SWITCH_MAKE_GRP_PATTERN(FuncGrp,FuncNo))
++
++#define SD_SWITCH_FUNC_STATUS_BLOCK_BYTES 64
++
++#define SD_SWITCH_FUNC_STATUS_GET_GRP_BIT_MASK(pBuffer,FuncGrp) \
++ (USHORT)((pBuffer)[50 + ((FuncGrp)*2)] | ((pBuffer)[51 + ((FuncGrp)*2)] << 8))
++
++#define SD_SWITCH_FUNC_STATUS_GET_MAX_CURRENT(pBuffer) \
++ (USHORT)((pBuffer)[62] | ((pBuffer)[63] << 8))
++
++static INLINE UINT8 SDSwitchGetSwitchResult(PUINT8 pBuffer, UINT8 FuncGrp)
++{
++ switch (FuncGrp) {
++ case 0:
++ return (pBuffer[47] & 0xF);
++ case 1:
++ return (pBuffer[47] >> 4);
++ case 2:
++ return (pBuffer[48] & 0xF);
++ case 3:
++ return (pBuffer[48] >> 4);
++ case 4:
++ return (pBuffer[49] & 0xF);
++ case 5:
++ return (pBuffer[49] >> 4);
++ default:
++ return 0xF;
++ }
++}
++
++#endif
+Index: linux-2.6.24-rc8-omoko/include/linux/sdio/ctsystem.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.24-rc8-omoko/include/linux/sdio/ctsystem.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,115 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: cpsystem.h
@@ -10104,10 +10743,10 @@
+}
+
+#endif /* __CPSYSTEM_H___ */
-Index: linux-2.6-openmoko/include/linux/sdio/ctsystem_linux.h
+Index: linux-2.6.24-rc8-omoko/include/linux/sdio/ctsystem_linux.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/include/linux/sdio/ctsystem_linux.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/include/linux/sdio/ctsystem_linux.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,983 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: ctsystem_linux.h
@@ -11092,10 +11731,10 @@
+#define CT_BE32_TO_CPU_ENDIAN(x) __be32_to_cpu(x)
+#endif /* __CPSYSTEM_LINUX_H___ */
+
-Index: linux-2.6-openmoko/include/linux/sdio/mmc_defs.h
+Index: linux-2.6.24-rc8-omoko/include/linux/sdio/mmc_defs.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/include/linux/sdio/mmc_defs.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/include/linux/sdio/mmc_defs.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,103 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: mmc_defs.h
@@ -11200,10 +11839,10 @@
+#define MMC_EXT_BUS_WIDTH_8_BIT 0x02
+
+#endif
-Index: linux-2.6-openmoko/include/linux/sdio/sdio_busdriver.h
+Index: linux-2.6.24-rc8-omoko/include/linux/sdio/sdio_busdriver.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/include/linux/sdio/sdio_busdriver.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/include/linux/sdio/sdio_busdriver.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,1435 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_busdriver.h
@@ -12640,653 +13279,10 @@
+
+#include "sdio_hcd_defs.h"
+#endif /* __SDIO_BUSDRIVER_H___ */
-Index: linux-2.6-openmoko/include/linux/sdio/_sdio_defs.h
+Index: linux-2.6.24-rc8-omoko/include/linux/sdio/sdio_hcd_defs.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/include/linux/sdio/_sdio_defs.h 2008-01-14 13:07:38.000000000 +0100
-@@ -0,0 +1,638 @@
-+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-+ at file: _sdio_defs.h
-+
-+ at abstract: SD/SDIO definitions
-+
-+ at notice: Copyright (c), 2004-2006 Atheros Communications, Inc.
-+
-+
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation;
-+ *
-+ * Software distributed under the License is distributed on an "AS
-+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-+ * implied. See the License for the specific language governing
-+ * rights and limitations under the License.
-+ *
-+ * Portions of this code were developed with information supplied from the
-+ * SD Card Association Simplified Specifications. The following conditions and disclaimers may apply:
-+ *
-+ * The following conditions apply to the release of the SD simplified specification (�Simplified
-+ * Specification�) by the SD Card Association. The Simplified Specification is a subset of the complete
-+ * SD Specification which is owned by the SD Card Association. This Simplified Specification is provided
-+ * on a non-confidential basis subject to the disclaimers below. Any implementation of the Simplified
-+ * Specification may require a license from the SD Card Association or other third parties.
-+ * Disclaimers:
-+ * The information contained in the Simplified Specification is presented only as a standard
-+ * specification for SD Cards and SD Host/Ancillary products and is provided "AS-IS" without any
-+ * representations or warranties of any kind. No responsibility is assumed by the SD Card Association for
-+ * any damages, any infringements of patents or other right of the SD Card Association or any third
-+ * parties, which may result from its use. No license is granted by implication, estoppel or otherwise
-+ * under any patent or other rights of the SD Card Association or any third party. Nothing herein shall
-+ * be construed as an obligation by the SD Card Association to disclose or distribute any technical
-+ * information, know-how or other confidential information to any third party.
-+ *
-+ *
-+ * The initial developers of the original code are Seung Yi and Paul Lever
-+ *
-+ * sdio at atheros.com
-+ *
-+ *
-+
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-+#ifndef ___SDIO_DEFS_H___
-+#define ___SDIO_DEFS_H___
-+
-+#define SD_INIT_BUS_CLOCK 100000 /* initialization clock in hz */
-+#define SPI_INIT_BUS_CLOCK 100000 /* initialization clock in hz */
-+#define SD_MAX_BUS_CLOCK 25000000 /* max clock speed in hz */
-+#define SD_HS_MAX_BUS_CLOCK 50000000 /* SD high speed max clock speed in hz */
-+#define SDIO_LOW_SPEED_MAX_BUS_CLOCK 400000 /* max low speed clock in hz */
-+#define SDMMC_MIN_INIT_CLOCKS 80 /* minimun number of initialization clocks */
-+#define SDIO_EMPC_CURRENT_THRESHOLD 300 /* SDIO 1.10 , EMPC (mA) threshold, we add some overhead */
-+
-+/* commands */
-+#define CMD0 0
-+#define CMD1 1
-+#define CMD2 2
-+#define CMD3 3
-+#define CMD4 4
-+#define CMD5 5
-+#define CMD6 6
-+#define CMD7 7
-+#define CMD9 9
-+#define CMD10 10
-+#define CMD12 12
-+#define CMD13 13
-+#define CMD15 15
-+#define CMD16 16
-+#define CMD17 17
-+#define CMD18 18
-+#define CMD24 24
-+#define CMD25 25
-+#define CMD27 27
-+#define CMD28 28
-+#define CMD29 29
-+#define CMD30 30
-+#define CMD32 32
-+#define CMD33 33
-+#define CMD38 38
-+#define CMD42 42
-+#define CMD52 52
-+#define CMD53 53
-+#define CMD55 55
-+#define CMD56 56
-+#define CMD58 58
-+#define CMD59 59
-+#define ACMD6 6
-+#define ACMD13 13
-+#define ACMD22 22
-+#define ACMD23 23
-+#define ACMD41 41
-+#define ACMD42 42
-+#define ACMD51 51
-+
-+#define SD_ACMD6_BUS_WIDTH_1_BIT 0x00
-+#define SD_ACMD6_BUS_WIDTH_4_BIT 0x02
-+
-+#define SD_CMD59_CRC_OFF 0x00000000
-+#define SD_CMD59_CRC_ON 0x00000001
-+
-+/* SD/SPI max response size */
-+#define SD_MAX_CMD_RESPONSE_BYTES SD_R2_RESPONSE_BYTES
-+
-+#define SD_R1_RESPONSE_BYTES 6
-+#define SD_R1B_RESPONSE_BYTES SD_R1_RESPONSE_BYTES
-+#define SD_R1_GET_CMD(pR) ((pR)[5] & 0xC0))
-+#define SD_R1_SET_CMD(pR,cmd) (pR)[5] = (cmd) & 0xC0
-+#define SD_R1_GET_CARD_STATUS(pR) (((UINT32)((pR)[1])) | \
-+ (((UINT32)((pR)[2])) << 8) | \
-+ (((UINT32)((pR)[3])) << 16) | \
-+ (((UINT32)((pR)[4])) << 24) )
-+#define SD_R1_SET_CMD_STATUS(pR,status) \
-+{ \
-+ (pR)[1] = (UINT8)(status); \
-+ (pR)[2] = (UINT8)((status) >> 8); \
-+ (pR)[3] = (UINT8)((status) >> 16); \
-+ (pR)[4] = (UINT8)((status) >> 24); \
-+}
-+
-+/* SD R1 card status bit masks */
-+#define SD_CS_CMD_OUT_OF_RANGE ((UINT32)(1 << 31))
-+#define SD_CS_ADDRESS_ERR (1 << 30)
-+#define SD_CS_BLK_LEN_ERR (1 << 29)
-+#define SD_CS_ERASE_SEQ_ERR (1 << 28)
-+#define SD_CS_ERASE_PARAM_ERR (1 << 27)
-+#define SD_CS_WP_ERR (1 << 26)
-+#define SD_CS_CARD_LOCKED (1 << 25)
-+#define SD_CS_LK_UNLK_FAILED (1 << 24)
-+#define SD_CS_PREV_CMD_CRC_ERR (1 << 23)
-+#define SD_CS_ILLEGAL_CMD_ERR (1 << 22)
-+#define SD_CS_ECC_FAILED (1 << 21)
-+#define SD_CS_CARD_INTERNAL_ERR (1 << 20)
-+#define SD_CS_GENERAL_ERR (1 << 19)
-+#define SD_CS_CSD_OVERWR_ERR (1 << 16)
-+#define SD_CS_WP_ERASE_SKIP (1 << 15)
-+#define SD_CS_ECC_DISABLED (1 << 14)
-+#define SD_CS_ERASE_RESET (1 << 13)
-+#define SD_CS_GET_STATE(status) (((status) >> 9) & 0x0f)
-+#define SD_CS_SET_STATE(status, state) \
-+{ \
-+ (status) &= ~(0x0F << 9); \
-+ (status) |= (state) << 9 \
-+}
-+
-+#define SD_CS_TRANSFER_ERRORS \
-+ ( SD_CS_ADDRESS_ERR | \
-+ SD_CS_BLK_LEN_ERR | \
-+ SD_CS_ERASE_SEQ_ERR | \
-+ SD_CS_ERASE_PARAM_ERR | \
-+ SD_CS_WP_ERR | \
-+ SD_CS_ECC_FAILED | \
-+ SD_CS_CARD_INTERNAL_ERR | \
-+ SD_CS_GENERAL_ERR )
-+
-+#define SD_CS_STATE_IDLE 0
-+#define SD_CS_STATE_READY 1
-+#define SD_CS_STATE_IDENT 2
-+#define SD_CS_STATE_STBY 3
-+#define SD_CS_STATE_TRANS 4
-+#define SD_CS_STATE_DATA 5
-+#define SD_CS_STATE_RCV 6
-+#define SD_CS_STATE_PRG 7
-+#define SD_CS_STATE_DIS 8
-+#define SD_CS_READY_FOR_DATA (1 << 8)
-+#define SD_CS_APP_CMD (1 << 5)
-+#define SD_CS_AKE_SEQ_ERR (1 << 3)
-+
-+/* SD R2 response */
-+#define SD_R2_RESPONSE_BYTES 17
-+#define MAX_CSD_CID_BYTES 16
-+#define SD_R2_SET_STUFF_BITS(pR) (pR)[16] = 0x3F
-+#define GET_SD_CSD_TRANS_SPEED(pR) (pR)[12]
-+#define GET_SD_CID_MANFID(pR) (pR)[15]
-+#define GET_SD_CID_PN_1(pR) (pR)[12]
-+#define GET_SD_CID_PN_2(pR) (pR)[11]
-+#define GET_SD_CID_PN_3(pR) (pR)[10]
-+#define GET_SD_CID_PN_4(pR) (pR)[9]
-+#define GET_SD_CID_PN_5(pR) (pR)[8]
-+#define GET_SD_CID_PN_6(pR) (pR)[7]
-+
-+#define GET_SD_CID_OEMID(pR) ((((UINT16)(pR)[14]) << 8 )| (UINT16)((pR)[13]))
-+#define SDMMC_OCR_VOLTAGE_MASK 0x7FFFFFFF
-+/* SD R3 response */
-+#define SD_R3_RESPONSE_BYTES 6
-+#define SD_R3_GET_OCR(pR) ((((UINT32)((pR)[1])) | \
-+ (((UINT32)((pR)[2])) << 8) | \
-+ (((UINT32)((pR)[3])) << 16) | \
-+ (((UINT32)((pR)[4])) << 24)) & SDMMC_OCR_VOLTAGE_MASK)
-+#define SD_R3_IS_CARD_READY(pR) (((pR)[4] & 0x80) == 0x80)
-+
-+/* OCR bit definitions */
-+#define SD_OCR_CARD_PWR_UP_STATUS ((UINT32)(1 << 31))
-+#define SD_OCR_3_5_TO_3_6_VDD (1 << 23)
-+#define SD_OCR_3_4_TO_3_5_VDD (1 << 22)
-+#define SD_OCR_3_3_TO_3_4_VDD (1 << 21)
-+#define SD_OCR_3_2_TO_3_3_VDD (1 << 20)
-+#define SD_OCR_3_1_TO_3_2_VDD (1 << 19)
-+#define SD_OCR_3_0_TO_3_1_VDD (1 << 18)
-+#define SD_OCR_2_9_TO_3_0_VDD (1 << 17)
-+#define SD_OCR_2_8_TO_2_9_VDD (1 << 16)
-+#define SD_OCR_2_7_TO_2_8_VDD (1 << 15)
-+#define SD_OCR_2_6_TO_2_7_VDD (1 << 14)
-+#define SD_OCR_2_5_TO_2_6_VDD (1 << 13)
-+#define SD_OCR_2_4_TO_2_5_VDD (1 << 12)
-+#define SD_OCR_2_3_TO_2_4_VDD (1 << 11)
-+#define SD_OCR_2_2_TO_2_3_VDD (1 << 10)
-+#define SD_OCR_2_1_TO_2_2_VDD (1 << 9)
-+#define SD_OCR_2_0_TO_2_1_VDD (1 << 8)
-+#define SD_OCR_1_9_TO_2_0_VDD (1 << 7)
-+#define SD_OCR_1_8_TO_1_9_VDD (1 << 6)
-+#define SD_OCR_1_7_TO_1_8_VDD (1 << 5)
-+#define SD_OCR_1_6_TO_1_7_VDD (1 << 4)
-+
-+/* SD Status data block */
-+#define SD_STATUS_DATA_BYTES 64
-+#define SDS_GET_DATA_WIDTH(buffer) ((buffer)[0] & 0xC0)
-+#define SDS_BUS_1_BIT 0x00
-+#define SDS_BUS_4_BIT 0x80
-+#define SDS_GET_SECURE_MODE(buffer) ((buffer)[0] & 0x20)
-+#define SDS_CARD_SECURE_MODE 0x20
-+#define SDS_GET_CARD_TYPE(buffer) ((buffer)[60] & 0x0F)
-+#define SDS_SD_CARD_RW 0x00
-+#define SDS_SD_CARD_ROM 0x01
-+
-+/* SD R6 response */
-+#define SD_R6_RESPONSE_BYTES 6
-+#define SD_R6_GET_RCA(pR) ((UINT16)((pR)[3]) | (((UINT16)((pR)[4])) << 8))
-+#define SD_R6_GET_CS(pR) ((UINT16)((pR)[1]) | (((UINT16)((pR)[2])) << 8))
-+
-+/* SD Configuration Register (SCR) */
-+#define SD_SCR_BYTES 8
-+#define SCR_REV_1_0 0x00
-+#define SCR_SD_SPEC_1_00 0x00
-+#define SCR_SD_SPEC_1_10 0x01
-+#define SCR_BUS_SUPPORTS_1_BIT 0x01
-+#define SCR_BUS_SUPPORTS_4_BIT 0x04
-+#define SCR_SD_SECURITY_MASK 0x70
-+#define SCR_SD_NO_SECURITY 0x00
-+#define SCR_SD_SECURITY_1_0 0x10
-+#define SCR_SD_SECURITY_2_0 0x20
-+#define SCR_DATA_STATUS_1_AFTER_ERASE 0x80
-+
-+#define GET_SD_SCR_STRUCT_VER(pB) ((pB)[7] >> 4)
-+#define GET_SD_SCR_SDSPEC_VER(pB) ((pB)[7] & 0x0F)
-+#define GET_SD_SCR_BUSWIDTHS(pB) ((pB)[6] & 0x0F)
-+#define GET_SD_SCR_BUSWIDTHS_FLAGS(pB) (pB)[6]
-+#define GET_SD_SCR_SECURITY(pB) (((pB)[6] >> 4) & 0x07)
-+#define GET_SD_SCR_DATA_STAT_AFTER_ERASE(pB) (((pB)[6] >> 7) & 0x01)
-+
-+/* SDIO R4 Response */
-+#define SD_SDIO_R4_RESPONSE_BYTES 6
-+#define SD_SDIO_R4_GET_OCR(pR) ((UINT32)((pR)[1]) | \
-+ (((UINT32)(pR)[2]) << 8) | \
-+ (((UINT32)(pR)[3]) << 16))
-+#define SD_SDIO_R4_IS_MEMORY_PRESENT(pR) (((pR)[4] & 0x08) == 0x08)
-+#define SD_SDIO_R4_GET_IO_FUNC_COUNT(pR) (((pR)[4] >> 4) & 0x07)
-+#define SD_SDIO_R4_IS_CARD_READY(pR) (((pR)[4] & 0x80) == 0x80)
-+
-+/* SDIO R5 response */
-+#define SD_SDIO_R5_RESPONSE_BYTES 6
-+#define SD_SDIO_R5_READ_DATA_OFFSET 1
-+#define SD_R5_GET_READ_DATA(pR) (pR)[SD_SDIO_R5_READ_DATA_OFFSET]
-+#define SD_R5_RESP_FLAGS_OFFSET 2
-+#define SD_R5_GET_RESP_FLAGS(pR) (pR)[SD_R5_RESP_FLAGS_OFFSET]
-+#define SD_R5_SET_CMD(pR,cmd) (pR)[5] = (cmd) & 0xC0
-+#define SD_R5_RESP_CMD_ERR (1 << 7) /* for previous cmd */
-+#define SD_R5_ILLEGAL_CMD (1 << 6)
-+#define SD_R5_GENERAL_ERR (1 << 3)
-+#define SD_R5_INVALID_FUNC (1 << 1)
-+#define SD_R5_ARG_RANGE_ERR (1 << 0)
-+#define SD_R5_CURRENT_CMD_ERRORS (SD_R5_ILLEGAL_CMD | SD_R5_GENERAL_ERR \
-+ | SD_R5_INVALID_FUNC | SD_R5_ARG_RANGE_ERR)
-+#define SD_R5_ERRORS (SD_R5_CURRENT_CMD_ERRORS)
-+
-+#define SD_R5_GET_IO_STATE(pR) (((pR)[2] >> 4) & 0x03)
-+#define SD_R5_STATE_DIS 0x00
-+#define SD_R5_STATE_CMD 0x01
-+#define SD_R5_STATE_TRN 0x02
-+
-+/* SDIO Modified R6 Response */
-+#define SD_SDIO_R6_RESPONSE_BYTES 6
-+#define SD_SDIO_R6_GET_RCA(pR) ((UINT16)((pR)[3]) | ((UINT16)((pR)[4]) << 8))
-+#define SD_SDIO_R6_GET_CSTAT(pR)((UINT16)((pR)[1]) | ((UINT16)((pR)[2]) << 8))
-+
-+/* SPI mode R1 response */
-+#define SPI_R1_RESPONSE_BYTES 1
-+#define GET_SPI_R1_RESP_TOKEN(pR) (pR)[0]
-+#define SPI_CS_STATE_IDLE 0x01
-+#define SPI_CS_ERASE_RESET (1 << 1)
-+#define SPI_CS_ILLEGAL_CMD (1 << 2)
-+#define SPI_CS_CMD_CRC_ERR (1 << 3)
-+#define SPI_CS_ERASE_SEQ_ERR (1 << 4)
-+#define SPI_CS_ADDRESS_ERR (1 << 5)
-+#define SPI_CS_PARAM_ERR (1 << 6)
-+#define SPI_CS_ERR_MASK 0x7c
-+
-+/* SPI mode R2 response */
-+#define SPI_R2_RESPONSE_BYTES 2
-+#define GET_SPI_R2_RESP_TOKEN(pR) (pR)[1]
-+#define GET_SPI_R2_STATUS_TOKEN(pR) (pR)[0]
-+/* the first response byte is defined above */
-+/* the second response byte is defined below */
-+#define SPI_CS_CARD_IS_LOCKED (1 << 0)
-+#define SPI_CS_LOCK_UNLOCK_FAILED (1 << 1)
-+#define SPI_CS_ERROR (1 << 2)
-+#define SPI_CS_INTERNAL_ERROR (1 << 3)
-+#define SPI_CS_ECC_FAILED (1 << 4)
-+#define SPI_CS_WP_VIOLATION (1 << 5)
-+#define SPI_CS_ERASE_PARAM_ERR (1 << 6)
-+#define SPI_CS_OUT_OF_RANGE (1 << 7)
-+
-+/* SPI mode R3 response */
-+#define SPI_R3_RESPONSE_BYTES 5
-+#define SPI_R3_GET_OCR(pR) ((((UINT32)((pR)[0])) | \
-+ (((UINT32)((pR)[1])) << 8) | \
-+ (((UINT32)((pR)[2])) << 16) | \
-+ (((UINT32)((pR)[3])) << 24)) & SDMMC_OCR_VOLTAGE_MASK)
-+#define SPI_R3_IS_CARD_READY(pR) (((pR)[3] & 0x80) == 0x80)
-+#define GET_SPI_R3_RESP_TOKEN(pR) (pR)[4]
-+
-+/* SPI mode SDIO R4 response */
-+#define SPI_SDIO_R4_RESPONSE_BYTES 5
-+#define SPI_SDIO_R4_GET_OCR(pR) ((UINT32)((pR)[0]) | \
-+ (((UINT32)(pR)[1]) << 8) | \
-+ (((UINT32)(pR)[2]) << 16))
-+#define SPI_SDIO_R4_IS_MEMORY_PRESENT(pR) (((pR)[3] & 0x08) == 0x08)
-+#define SPI_SDIO_R4_GET_IO_FUNC_COUNT(pR) (((pR)[3] >> 4) & 0x07)
-+#define SPI_SDIO_R4_IS_CARD_READY(pR) (((pR)[3] & 0x80) == 0x80)
-+#define GET_SPI_SDIO_R4_RESP_TOKEN(pR) (pR)[4]
-+
-+/* SPI Mode SDIO R5 response */
-+#define SPI_SDIO_R5_RESPONSE_BYTES 2
-+#define GET_SPI_SDIO_R5_RESP_TOKEN(pR) (pR)[1]
-+#define GET_SPI_SDIO_R5_RESPONSE_RDATA(pR) (pR)[0]
-+#define SPI_R5_IDLE_STATE 0x01
-+#define SPI_R5_ILLEGAL_CMD (1 << 2)
-+#define SPI_R5_CMD_CRC (1 << 3)
-+#define SPI_R5_FUNC_ERR (1 << 4)
-+#define SPI_R5_PARAM_ERR (1 << 6)
-+
-+/* SDIO COMMAND 52 Definitions */
-+#define CMD52_READ 0
-+#define CMD52_WRITE 1
-+#define CMD52_READ_AFTER_WRITE 1
-+#define CMD52_NORMAL_WRITE 0
-+#define SDIO_SET_CMD52_ARG(arg,rw,func,raw,address,writedata) \
-+ (arg) = (((rw) & 1) << 31) | \
-+ (((func) & 0x7) << 28) | \
-+ (((raw) & 1) << 27) | \
-+ (1 << 26) | \
-+ (((address) & 0x1FFFF) << 9) | \
-+ (1 << 8) | \
-+ ((writedata) & 0xFF)
-+#define SDIO_SET_CMD52_READ_ARG(arg,func,address) \
-+ SDIO_SET_CMD52_ARG(arg,CMD52_READ,(func),0,address,0x00)
-+#define SDIO_SET_CMD52_WRITE_ARG(arg,func,address,value) \
-+ SDIO_SET_CMD52_ARG(arg,CMD52_WRITE,(func),CMD52_NORMAL_WRITE,address,value)
-+
-+/* SDIO COMMAND 53 Definitions */
-+#define CMD53_READ 0
-+#define CMD53_WRITE 1
-+#define CMD53_BLOCK_BASIS 1
-+#define CMD53_BYTE_BASIS 0
-+#define CMD53_FIXED_ADDRESS 0
-+#define CMD53_INCR_ADDRESS 1
-+#define SDIO_SET_CMD53_ARG(arg,rw,func,mode,opcode,address,bytes_blocks) \
-+ (arg) = (((rw) & 1) << 31) | \
-+ (((func) & 0x7) << 28) | \
-+ (((mode) & 1) << 27) | \
-+ (((opcode) & 1) << 26) | \
-+ (((address) & 0x1FFFF) << 9) | \
-+ ((bytes_blocks) & 0x1FF)
-+
-+#define SDIO_MAX_LENGTH_BYTE_BASIS 512
-+#define SDIO_MAX_BLOCKS_BLOCK_BASIS 511
-+#define SDIO_MAX_BYTES_PER_BLOCK 2048
-+#define SDIO_COMMON_AREA_FUNCTION_NUMBER 0
-+#define SDIO_FIRST_FUNCTION_NUMBER 1
-+#define SDIO_LAST_FUNCTION_NUMBER 7
-+
-+#define CMD53_CONVERT_BYTE_BASIS_BLK_LENGTH_PARAM(b) (((b) < SDIO_MAX_LENGTH_BYTE_BASIS) ? (b) : 0)
-+#define CMD53_CONVERT_BLOCK_BASIS_BLK_COUNT_PARAM(b) (((b) <= SDIO_MAX_BLOCKS_BLOCK_BASIS) ? (b) : 0)
-+
-+
-+/* SDIO COMMON Registers */
-+
-+/* revision register */
-+#define CCCR_SDIO_REVISION_REG 0x00
-+#define CCCR_REV_MASK 0x0F
-+#define CCCR_REV_1_0 0x00
-+#define CCCR_REV_1_1 0x01
-+#define SDIO_REV_MASK 0xF0
-+#define SDIO_REV_1_00 0x00
-+#define SDIO_REV_1_10 0x10
-+#define SDIO_REV_1_20 0x20
-+/* SD physical spec revision */
-+#define SD_SPEC_REVISION_REG 0x01
-+#define SD_REV_MASK 0x0F
-+#define SD_REV_1_01 0x00
-+#define SD_REV_1_10 0x01
-+/* I/O Enable */
-+#define SDIO_ENABLE_REG 0x02
-+/* I/O Ready */
-+#define SDIO_READY_REG 0x03
-+/* Interrupt Enable */
-+#define SDIO_INT_ENABLE_REG 0x04
-+#define SDIO_INT_MASTER_ENABLE 0x01
-+#define SDIO_INT_ALL_ENABLE 0xFE
-+/* Interrupt Pending */
-+#define SDIO_INT_PENDING_REG 0x05
-+#define SDIO_INT_PEND_MASK 0xFE
-+/* I/O Abort */
-+#define SDIO_IO_ABORT_REG 0x06
-+#define SDIO_IO_RESET (1 << 3)
-+/* Bus Interface */
-+#define SDIO_BUS_IF_REG 0x07
-+#define CARD_DETECT_DISABLE 0x80
-+#define SDIO_BUS_WIDTH_1_BIT 0x00
-+#define SDIO_BUS_WIDTH_4_BIT 0x02
-+/* Card Capabilities */
-+#define SDIO_CARD_CAPS_REG 0x08
-+#define SDIO_CAPS_CMD52_WHILE_DATA 0x01 /* card can issue CMD52 while data transfer */
-+#define SDIO_CAPS_MULTI_BLOCK 0x02 /* card supports multi-block data transfers */
-+#define SDIO_CAPS_READ_WAIT 0x04 /* card supports read-wait protocol */
-+#define SDIO_CAPS_SUSPEND_RESUME 0x08 /* card supports I/O function suspend/resume */
-+#define SDIO_CAPS_INT_MULTI_BLK 0x10 /* interrupts between multi-block data capable */
-+#define SDIO_CAPS_ENB_INT_MULTI_BLK 0x20 /* enable ints between muli-block data */
-+#define SDIO_CAPS_LOW_SPEED 0x40 /* low speed card */
-+#define SDIO_CAPS_4BIT_LS 0x80 /* 4 bit low speed card */
-+/* Common CIS pointer */
-+#define SDIO_CMN_CIS_PTR_LOW_REG 0x09
-+#define SDIO_CMN_CIS_PTR_MID_REG 0x0a
-+#define SDIO_CMN_CIS_PTR_HI_REG 0x0b
-+/* Bus suspend */
-+#define SDIO_BUS_SUSPEND_REG 0x0c
-+#define SDIO_FUNC_SUSPEND_STATUS_MASK 0x01 /* selected function is suspended */
-+#define SDIO_SUSPEND_FUNCTION 0x02 /* suspend the current selected function */
-+/* Function select (for bus suspension) */
-+#define SDIO_FUNCTION_SELECT_REG 0x0d
-+#define SDIO_SUSPEND_FUNCTION_0 0x00
-+#define SDIO_SUSPEND_MEMORY_FUNC_MASK 0x08
-+/* Function Execution */
-+#define SDIO_FUNCTION_EXEC_REG 0x0e
-+#define SDIO_MEMORY_FUNC_EXEC_MASK 0x01
-+/* Function Ready */
-+#define SDIO_FUNCTION_READY_REG 0x0f
-+#define SDIO_MEMORY_FUNC_BUSY_MASK 0x01
-+
-+/* power control 1.10 only */
-+#define SDIO_POWER_CONTROL_REG 0x12
-+#define SDIO_POWER_CONTROL_SMPC 0x01
-+#define SDIO_POWER_CONTROL_EMPC 0x02
-+
-+/* high speed control , 1.20 only */
-+#define SDIO_HS_CONTROL_REG 0x13
-+#define SDIO_HS_CONTROL_SHS 0x01
-+#define SDIO_HS_CONTROL_EHS 0x02
-+
-+/* Function Base Registers */
-+#define xFUNCTION_FBR_OFFSET(funcNo) (0x100*(funcNo))
-+/* offset calculation that does not use multiplication */
-+static INLINE UINT32 CalculateFBROffset(UCHAR FuncNo) {
-+ UCHAR i = FuncNo;
-+ UINT32 offset = 0;
-+ while (i) {
-+ offset += 0x100;
-+ i--;
-+ }
-+ return offset;
-+}
-+/* Function info */
-+#define FBR_FUNC_INFO_REG_OFFSET(fbr) ((fbr) + 0x00)
-+#define FUNC_INFO_SUPPORTS_CSA_MASK 0x40
-+#define FUNC_INFO_ENABLE_CSA 0x80
-+#define FUNC_INFO_DEVICE_CODE_MASK 0x0F
-+#define FUNC_INFO_DEVICE_CODE_LAST 0x0F
-+#define FBR_FUNC_EXT_DEVICE_CODE_OFFSET(fbr) ((fbr) + 0x01)
-+/* Function Power selection */
-+#define FBR_FUNC_POWER_SELECT_OFFSET(fbr) ((fbr) + 0x02)
-+#define FUNC_POWER_SELECT_SPS 0x01
-+#define FUNC_POWER_SELECT_EPS 0x02
-+/* Function CIS ptr */
-+#define FBR_FUNC_CIS_LOW_OFFSET(fbr) ((fbr) + 0x09)
-+#define FBR_FUNC_CIS_MID_OFFSET(fbr) ((fbr) + 0x0a)
-+#define FBR_FUNC_CIS_HI_OFFSET(fbr) ((fbr) + 0x0b)
-+/* Function CSA ptr */
-+#define FBR_FUNC_CSA_LOW_OFFSET(fbr) ((fbr) + 0x0c)
-+#define FBR_FUNC_CSA_MID_OFFSET(fbr) ((fbr) + 0x0d)
-+#define FBR_FUNC_CSA_HI_OFFSET(fbr) ((fbr) + 0x0e)
-+/* Function CSA data window */
-+#define FBR_FUNC_CSA_DATA_OFFSET(fbr) ((fbr) + 0x0f)
-+/* Function Block Size Control */
-+#define FBR_FUNC_BLK_SIZE_LOW_OFFSET(fbr) ((fbr) + 0x10)
-+#define FBR_FUNC_BLK_SIZE_HI_OFFSET(fbr) ((fbr) + 0x11)
-+#define SDIO_CIS_AREA_BEGIN 0x00001000
-+#define SDIO_CIS_AREA_END 0x00017fff
-+/* Tuple definitions */
-+#define CISTPL_NULL 0x00
-+#define CISTPL_CHECKSUM 0x10
-+#define CISTPL_VERS_1 0x15
-+#define CISTPL_ALTSTR 0x16
-+#define CISTPL_MANFID 0x20
-+#define CISTPL_FUNCID 0x21
-+#define CISTPL_FUNCE 0x22
-+#define CISTPL_VENDOR 0x91
-+#define CISTPL_END 0xff
-+#define CISTPL_LINK_END 0xff
-+
-+
-+/* these structures must be packed */
-+
-+/* Manufacturer ID tuple */
-+struct SDIO_MANFID_TPL {
-+ UINT16 ManufacturerCode; /* jedec code */
-+ UINT16 ManufacturerInfo; /* manufacturer specific code */
-+}CT_PACK_STRUCT;
-+
-+/* Function ID Tuple */
-+struct SDIO_FUNC_ID_TPL {
-+ UINT8 DeviceCode; /* device code */
-+ UINT8 InitMask; /* system initialization mask (not used) */
-+}CT_PACK_STRUCT;
-+
-+ /* Extended Function Tuple (Common) */
-+struct SDIO_FUNC_EXT_COMMON_TPL {
-+ UINT8 Type; /* type */
-+ UINT16 Func0_MaxBlockSize; /* max function 0 block transfer size */
-+ UINT8 MaxTransSpeed; /* max transfer speed (encoded) */
-+#define TRANSFER_UNIT_MULTIPIER_MASK 0x07
-+#define TIME_VALUE_MASK 0x78
-+#define TIME_VALUE_SHIFT 3
-+}CT_PACK_STRUCT;
-+
-+/* Extended Function Tuple (Per Function) */
-+struct SDIO_FUNC_EXT_FUNCTION_TPL {
-+ UINT8 Type; /* type */
-+#define SDIO_FUNC_INFO_WAKEUP_SUPPORT 0x01
-+ UINT8 FunctionInfo; /* function info */
-+ UINT8 SDIORev; /* revision */
-+ UINT32 CardPSN; /* product serial number */
-+ UINT32 CSASize; /* CSA size */
-+ UINT8 CSAProperties; /* CSA properties */
-+ UINT16 MaxBlockSize; /* max block size for block transfers */
-+ UINT32 FunctionOCR; /* optimal function OCR */
-+ UINT8 OpMinPwr; /* operational min power */
-+ UINT8 OpAvgPwr; /* operational average power */
-+ UINT8 OpMaxPwr; /* operation maximum power */
-+ UINT8 SbMinPwr; /* standby minimum power */
-+ UINT8 SbAvgPwr; /* standby average power */
-+ UINT8 SbMaxPwr; /* standby maximum power */
-+ UINT16 MinBandWidth; /* minimum bus bandwidth */
-+ UINT16 OptBandWidth; /* optimalbus bandwitdh */
-+}CT_PACK_STRUCT;
-+
-+struct SDIO_FUNC_EXT_FUNCTION_TPL_1_1 {
-+ struct SDIO_FUNC_EXT_FUNCTION_TPL CommonInfo; /* from 1.0*/
-+ UINT16 EnableTimeOut; /* timeout for enable */
-+ UINT16 OperPwrMaxPwr;
-+ UINT16 OperPwrAvgPwr;
-+ UINT16 HiPwrMaxPwr;
-+ UINT16 HiPwrAvgPwr;
-+ UINT16 LowPwrMaxPwr;
-+ UINT16 LowPwrAvgPwr;
-+}CT_PACK_STRUCT;
-+
-+static INLINE SDIO_STATUS ConvertCMD52ResponseToSDIOStatus(UINT8 CMD52ResponseFlags) {
-+ if (!(CMD52ResponseFlags & SD_R5_ERRORS)) {
-+ return SDIO_STATUS_SUCCESS;
-+ }
-+ if (CMD52ResponseFlags & SD_R5_ILLEGAL_CMD) {
-+ return SDIO_STATUS_DATA_STATE_INVALID;
-+ } else if (CMD52ResponseFlags & SD_R5_INVALID_FUNC) {
-+ return SDIO_STATUS_INVALID_FUNC;
-+ } else if (CMD52ResponseFlags & SD_R5_ARG_RANGE_ERR) {
-+ return SDIO_STATUS_FUNC_ARG_ERROR;
-+ } else {
-+ return SDIO_STATUS_DATA_ERROR_UNKNOWN;
-+ }
-+}
-+
-+/* CMD6 mode switch definitions */
-+
-+#define SD_SWITCH_FUNC_CHECK 0
-+#define SD_SWITCH_FUNC_SET ((UINT32)(1 << 31))
-+#define SD_FUNC_NO_SELECT_MASK 0x00FFFFFF
-+#define SD_SWITCH_GRP_1 0
-+#define SD_SWITCH_GRP_2 1
-+#define SD_SWITCH_GRP_3 2
-+#define SD_SWITCH_GRP_4 3
-+#define SD_SWITCH_GRP_5 4
-+#define SD_SWITCH_GRP_6 5
-+
-+#define SD_SWITCH_HIGH_SPEED_GROUP SD_SWITCH_GRP_1
-+#define SD_SWITCH_HIGH_SPEED_FUNC_NO 1
-+
-+#define SD_SWITCH_MAKE_SHIFT(grp) ((grp) * 4)
-+
-+#define SD_SWITCH_MAKE_GRP_PATTERN(FuncGrp,FuncNo) \
-+ ((SD_FUNC_NO_SELECT_MASK & (~(0xF << SD_SWITCH_MAKE_SHIFT(FuncGrp)))) | \
-+ (((FuncNo) & 0xF) << SD_SWITCH_MAKE_SHIFT(FuncGrp))) \
-+
-+#define SD_SWITCH_FUNC_ARG_GROUP_CHECK(FuncGrp,FuncNo) \
-+ (SD_SWITCH_FUNC_CHECK | SD_SWITCH_MAKE_GRP_PATTERN(FuncGrp,FuncNo))
-+
-+#define SD_SWITCH_FUNC_ARG_GROUP_SET(FuncGrp,FuncNo) \
-+ (SD_SWITCH_FUNC_SET | SD_SWITCH_MAKE_GRP_PATTERN(FuncGrp,FuncNo))
-+
-+#define SD_SWITCH_FUNC_STATUS_BLOCK_BYTES 64
-+
-+#define SD_SWITCH_FUNC_STATUS_GET_GRP_BIT_MASK(pBuffer,FuncGrp) \
-+ (USHORT)((pBuffer)[50 + ((FuncGrp)*2)] | ((pBuffer)[51 + ((FuncGrp)*2)] << 8))
-+
-+#define SD_SWITCH_FUNC_STATUS_GET_MAX_CURRENT(pBuffer) \
-+ (USHORT)((pBuffer)[62] | ((pBuffer)[63] << 8))
-+
-+static INLINE UINT8 SDSwitchGetSwitchResult(PUINT8 pBuffer, UINT8 FuncGrp)
-+{
-+ switch (FuncGrp) {
-+ case 0:
-+ return (pBuffer[47] & 0xF);
-+ case 1:
-+ return (pBuffer[47] >> 4);
-+ case 2:
-+ return (pBuffer[48] & 0xF);
-+ case 3:
-+ return (pBuffer[48] >> 4);
-+ case 4:
-+ return (pBuffer[49] & 0xF);
-+ case 5:
-+ return (pBuffer[49] >> 4);
-+ default:
-+ return 0xF;
-+ }
-+}
-+
-+#endif
-Index: linux-2.6-openmoko/include/linux/sdio/sdio_hcd_defs.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/include/linux/sdio/sdio_hcd_defs.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/include/linux/sdio/sdio_hcd_defs.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,219 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_hcd_defs.h
@@ -13507,10 +13503,10 @@
+void SDIO_BusRemoveOSDevice(POS_PNPDRIVER pDriver, POS_PNPDEVICE pDevice);
+
+#endif /* __SDIO_BUSDRIVER_H___ */
-Index: linux-2.6-openmoko/include/linux/sdio/sdio_lib.h
+Index: linux-2.6.24-rc8-omoko/include/linux/sdio/sdio_lib.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/include/linux/sdio/sdio_lib.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/include/linux/sdio/sdio_lib.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,270 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdio_lib.h
@@ -13782,10 +13778,10 @@
+
+
+#endif /* __SDIO_LIB_H___*/
-Index: linux-2.6-openmoko/include/linux/sdio/sdlist.h
+Index: linux-2.6.24-rc8-omoko/include/linux/sdio/sdlist.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6-openmoko/include/linux/sdio/sdlist.h 2008-01-14 13:07:38.000000000 +0100
++++ linux-2.6.24-rc8-omoko/include/linux/sdio/sdlist.h 2008-01-22 13:33:10.000000000 +0100
@@ -0,0 +1,141 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ at file: sdlist.h
More information about the commitlog
mailing list