r4739 - developers/werner/wlan-spi/patches-tracking

werner at docs.openmoko.org werner at docs.openmoko.org
Sun Nov 2 10:46:58 CET 2008


Author: werner
Date: 2008-11-02 10:46:58 +0100 (Sun, 02 Nov 2008)
New Revision: 4739

Modified:
   developers/werner/wlan-spi/patches-tracking/hif-linux-sdio.patch
Log:
More cleanup. Separate commit since this moves a lot of code but doesn't
change any functionality.

drivers/ar6000/hif/hif2.c:
- moved HIF setup/takedown code closer down, where its Linux counterpart is



Modified: developers/werner/wlan-spi/patches-tracking/hif-linux-sdio.patch
===================================================================
--- developers/werner/wlan-spi/patches-tracking/hif-linux-sdio.patch	2008-11-02 09:43:38 UTC (rev 4738)
+++ developers/werner/wlan-spi/patches-tracking/hif-linux-sdio.patch	2008-11-02 09:46:58 UTC (rev 4739)
@@ -25,7 +25,7 @@
 Index: ktrack/drivers/ar6000/hif/hif2.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ ktrack/drivers/ar6000/hif/hif2.c	2008-11-02 07:39:48.000000000 -0200
++++ ktrack/drivers/ar6000/hif/hif2.c	2008-11-02 07:44:12.000000000 -0200
 @@ -0,0 +1,569 @@
 +/*
 + * hif2.c - HIF layer re-implementation for the Linux SDIO stack
@@ -280,58 +280,6 @@
 +}
 +
 +
-+/* ----- Device initialization and shutdown (HIF side) --------------------- */
-+
-+
-+int HIFInit(HTC_CALLBACKS *callbacks)
-+{
-+	BUG_ON(!callbacks);
-+
-+	printk(KERN_INFO "HIFInit\n");
-+	htcCallbacks = *callbacks;
-+
-+	return 0;
-+}
-+
-+
-+A_STATUS HIFConfigureDevice(HIF_DEVICE *hif,
-+    HIF_DEVICE_CONFIG_OPCODE opcode, void *config, A_UINT32 configLen)
-+{
-+	struct device *dev = HIFGetOSDevice(hif);
-+	HIF_DEVICE_IRQ_PROCESSING_MODE *ipm_cfg = config;
-+	A_UINT32 *mbs_cfg = config;
-+	int i;
-+
-+	dev_dbg(dev, "HIFConfigureDevice\n");
-+
-+	switch (opcode) {
-+	case HIF_DEVICE_GET_MBOX_BLOCK_SIZE:
-+		for (i = 0; i != MBOXES; i++)
-+			mbs_cfg[i] = HIF_MBOX_BLOCK_SIZE;
-+		break;
-+	case HIF_DEVICE_GET_MBOX_ADDR:
-+		for (i = 0; i != MBOXES; i++)
-+			mbs_cfg[i] = HIF_MBOX_START_ADDR(i);
-+		break;
-+	case HIF_DEVICE_GET_IRQ_PROC_MODE:
-+		*ipm_cfg = HIF_DEVICE_IRQ_SYNC_ONLY;
-+//		*ipm_cfg = HIF_DEVICE_IRQ_ASYNC_SYNC;
-+		break;
-+	default:
-+		return A_ERROR;
-+	}
-+	return A_OK;
-+}
-+
-+
-+void HIFShutDownDevice(HIF_DEVICE *hif)
-+{
-+	struct device *dev = HIFGetOSDevice(hif);
-+
-+	dev_dbg(dev, "HIFShutDownDevice\n");
-+}
-+
-+
 +/* ----- Interrupt handling ------------------------------------------------ */
 +
 +/*
@@ -458,6 +406,58 @@
 +}
 +
 +
++/* ----- Device initialization and shutdown (HIF side) --------------------- */
++
++
++int HIFInit(HTC_CALLBACKS *callbacks)
++{
++	BUG_ON(!callbacks);
++
++	printk(KERN_INFO "HIFInit\n");
++	htcCallbacks = *callbacks;
++
++	return 0;
++}
++
++
++A_STATUS HIFConfigureDevice(HIF_DEVICE *hif,
++    HIF_DEVICE_CONFIG_OPCODE opcode, void *config, A_UINT32 configLen)
++{
++	struct device *dev = HIFGetOSDevice(hif);
++	HIF_DEVICE_IRQ_PROCESSING_MODE *ipm_cfg = config;
++	A_UINT32 *mbs_cfg = config;
++	int i;
++
++	dev_dbg(dev, "HIFConfigureDevice\n");
++
++	switch (opcode) {
++	case HIF_DEVICE_GET_MBOX_BLOCK_SIZE:
++		for (i = 0; i != MBOXES; i++)
++			mbs_cfg[i] = HIF_MBOX_BLOCK_SIZE;
++		break;
++	case HIF_DEVICE_GET_MBOX_ADDR:
++		for (i = 0; i != MBOXES; i++)
++			mbs_cfg[i] = HIF_MBOX_START_ADDR(i);
++		break;
++	case HIF_DEVICE_GET_IRQ_PROC_MODE:
++		*ipm_cfg = HIF_DEVICE_IRQ_SYNC_ONLY;
++//		*ipm_cfg = HIF_DEVICE_IRQ_ASYNC_SYNC;
++		break;
++	default:
++		return A_ERROR;
++	}
++	return A_OK;
++}
++
++
++void HIFShutDownDevice(HIF_DEVICE *hif)
++{
++	struct device *dev = HIFGetOSDevice(hif);
++
++	dev_dbg(dev, "HIFShutDownDevice\n");
++}
++
++
 +/* ----- Device setup and removal (Linux side) ----------------------------- */
 +
 +




More information about the commitlog mailing list