Send commitlog mailing list submissions to
commitlog@lists.openmoko.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r4674 - developers/werner/wlan-spi/patches
([EMAIL PROTECTED])
2. r4675 - developers/werner/wlan-spi/patches
([EMAIL PROTECTED])
3. r4676 - developers/werner/wlan-spi/patches
([EMAIL PROTECTED])
4. r4677 - developers/werner/ahrt/host/tmc/lib
([EMAIL PROTECTED])
5. r4678 - developers/werner/wlan-spi/patches
([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2008-09-27 16:37:38 +0200 (Sat, 27 Sep 2008)
New Revision: 4674
Modified:
developers/werner/wlan-spi/patches/hack-silence-battery.patch
developers/werner/wlan-spi/patches/tweak-spi.patch
Log:
- moved SPI clock setting from hack-silence-battery.patch (oops !) to
tweak-spi.patch
- set the maximum SPI clock to 12MHz and explained what happens if we exceed
this limit
- removed unnecessary dummy read before last SPI byte
Modified: developers/werner/wlan-spi/patches/hack-silence-battery.patch
===================================================================
--- developers/werner/wlan-spi/patches/hack-silence-battery.patch
2008-09-27 00:49:01 UTC (rev 4673)
+++ developers/werner/wlan-spi/patches/hack-silence-battery.patch
2008-09-27 14:37:38 UTC (rev 4674)
@@ -14,16 +14,3 @@
return ret;
}
-Index: korig/arch/arm/mach-s3c2440/mach-gta02.c
-===================================================================
---- korig.orig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-26
21:19:03.000000000 -0300
-+++ korig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-26 21:19:07.000000000
-0300
-@@ -1239,7 +1239,7 @@
- static struct spi_board_info gta02_spi_mmc_bdinfo = {
- .modalias = "mmc_spi",
- .irq = IRQ_EINT3, /* unused ? */
-- .max_speed_hz = 25 * 1000 * 1000,
-+ .max_speed_hz = 10 * 1000 * 1000,
- .bus_num = 0,
- .chip_select = 0,
- .mode = SPI_MODE_0,
Modified: developers/werner/wlan-spi/patches/tweak-spi.patch
===================================================================
--- developers/werner/wlan-spi/patches/tweak-spi.patch 2008-09-27 00:49:01 UTC
(rev 4673)
+++ developers/werner/wlan-spi/patches/tweak-spi.patch 2008-09-27 14:37:38 UTC
(rev 4674)
@@ -1,18 +1,23 @@
-Work in progress. Makes spi_s3c24xx.c work for 1 and 10MHz.
-Something breaks at 20 or 25MHz.
+Work in progress. Makes spi_s3c24xx.c work for up to 12MHz.
+At speeds of 13MHz or higher, we have setup time issues. I.e., the
+SPI host sees the data coming from the device delayed by one bit,
+even though things look fine on the scope.
+
+This 12MHz/13MHz "barrier" exists with or without probes attached,
+suggesting capacitative loading plays only a minor role in this.
+
Index: korig/drivers/spi/spi_s3c24xx.c
===================================================================
---- korig.orig/drivers/spi/spi_s3c24xx.c 2008-09-26 20:47:30.000000000
-0300
-+++ korig/drivers/spi/spi_s3c24xx.c 2008-09-26 21:06:23.000000000 -0300
-@@ -198,6 +198,29 @@
+--- korig.orig/drivers/spi/spi_s3c24xx.c 2008-09-27 11:28:42.000000000
-0300
++++ korig/drivers/spi/spi_s3c24xx.c 2008-09-27 11:29:40.000000000 -0300
+@@ -198,6 +198,27 @@
writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT);
wait_for_completion(&hw->done);
+ /*
+ * Get the last byte. Since we don't have more data we can send in
-+ * order to clock the byte out of the SPI system, we need to wait and
-+ * to provide a clock by a dummy read.
++ * order to clock the byte out of the SPI system, we need to wait.
+ *
+ * Duh, I'm just handwaving here about possible explanations of what's
+ * going on in the hardware. This is the voodoo ritual that makes it
@@ -20,7 +25,6 @@
+ */
+ if (hw->rx && hw->count) {
+ udelay(1+10*1000000/spi->max_speed_hz);
-+ //readb(hw->regs + S3C2410_SPRDAT);
+ hw->rx[hw->count-1] = readb(hw->regs + S3C2410_SPRDAT);
+ }
+
@@ -35,7 +39,7 @@
return hw->count;
}
-@@ -233,8 +256,23 @@
+@@ -233,8 +254,23 @@
hw->count++;
@@ -61,3 +65,16 @@
count++;
+Index: korig/arch/arm/mach-s3c2440/mach-gta02.c
+===================================================================
+--- korig.orig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27
11:29:48.000000000 -0300
++++ korig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27 11:30:13.000000000
-0300
+@@ -1239,7 +1239,7 @@
+ static struct spi_board_info gta02_spi_mmc_bdinfo = {
+ .modalias = "mmc_spi",
+ .irq = IRQ_EINT3, /* unused ? */
+- .max_speed_hz = 25 * 1000 * 1000,
++ .max_speed_hz = 12 * 1000 * 1000, /* SPI doesn't want to go faster */
+ .bus_num = 0,
+ .chip_select = 0,
+ .mode = SPI_MODE_0,
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-09-28 02:37:32 +0200 (Sun, 28 Sep 2008)
New Revision: 4675
Modified:
developers/werner/wlan-spi/patches/gta02-mmc-spi.patch
Log:
Disable pull-downs, just to keep things clean.
Modified: developers/werner/wlan-spi/patches/gta02-mmc-spi.patch
===================================================================
--- developers/werner/wlan-spi/patches/gta02-mmc-spi.patch 2008-09-27
14:37:38 UTC (rev 4674)
+++ developers/werner/wlan-spi/patches/gta02-mmc-spi.patch 2008-09-28
00:37:32 UTC (rev 4675)
@@ -12,8 +12,8 @@
Index: korig/arch/arm/mach-s3c2440/Kconfig
===================================================================
---- korig.orig/arch/arm/mach-s3c2440/Kconfig 2008-09-04 11:31:41.000000000
-0300
-+++ korig/arch/arm/mach-s3c2440/Kconfig 2008-09-04 11:31:44.000000000
-0300
+--- korig.orig/arch/arm/mach-s3c2440/Kconfig 2008-09-27 11:04:05.000000000
-0300
++++ korig/arch/arm/mach-s3c2440/Kconfig 2008-09-27 11:04:05.000000000
-0300
@@ -110,6 +110,15 @@
bool "GPIO bit-banging SPI"
select MMC_SPI
@@ -32,8 +32,8 @@
endmenu
Index: korig/arch/arm/mach-s3c2440/mach-gta02.c
===================================================================
---- korig.orig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-04
11:31:41.000000000 -0300
-+++ korig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-04 11:58:15.000000000
-0300
+--- korig.orig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27
11:04:05.000000000 -0300
++++ korig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27 21:31:57.000000000
-0300
@@ -1234,9 +1234,7 @@
/* ----- AR6000 WLAN interface ---------------------------------------------
*/
@@ -65,7 +65,7 @@
#ifdef CONFIG_AR6K_SPI_S3C24XX_GPIO
-@@ -1689,6 +1698,30 @@
+@@ -1689,6 +1698,45 @@
platform_device_register(>a02_spi_wlan);
#endif /* CONFIG_AR6K_SPI_S3C24XX_GPIO */
@@ -93,6 +93,21 @@
+
+#endif /* !CONFIG_AR6K_SPI_S3C24XX */
+
++ /* disable all pull-downs on SD/MMC and SPI */
++
++ s3c2410_gpio_pullup(S3C2410_GPE5, 1); /* SD/MMC block */
++ s3c2410_gpio_pullup(S3C2410_GPE6, 1);
++ s3c2410_gpio_pullup(S3C2410_GPE7, 1);
++ s3c2410_gpio_pullup(S3C2410_GPE8, 1);
++ s3c2410_gpio_pullup(S3C2410_GPE9, 1);
++ s3c2410_gpio_pullup(S3C2410_GPE10, 1);
++
++ s3c2410_gpio_pullup(S3C2410_GPE11, 1); /* SPI block */
++ s3c2410_gpio_pullup(S3C2410_GPE12, 1);
++ s3c2410_gpio_pullup(S3C2410_GPE13, 1);
++ s3c2410_gpio_pullup(S3C2410_GPF3, 1);
++ s3c2410_gpio_pullup(S3C2410_GPG2, 1);
++
// platform_device_register(&s3c_device_spi_acc);
platform_device_register(>a02_button_dev);
platform_device_register(>a02_pm_gsm_dev);
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-09-28 03:42:31 +0200 (Sun, 28 Sep 2008)
New Revision: 4676
Modified:
developers/werner/wlan-spi/patches/tweak-spi.patch
Log:
Updated description of the SPI module's problems. They're not as grim as
the older comment suggested.
Modified: developers/werner/wlan-spi/patches/tweak-spi.patch
===================================================================
--- developers/werner/wlan-spi/patches/tweak-spi.patch 2008-09-28 00:37:32 UTC
(rev 4675)
+++ developers/werner/wlan-spi/patches/tweak-spi.patch 2008-09-28 01:42:31 UTC
(rev 4676)
@@ -9,8 +9,8 @@
Index: korig/drivers/spi/spi_s3c24xx.c
===================================================================
---- korig.orig/drivers/spi/spi_s3c24xx.c 2008-09-27 11:28:42.000000000
-0300
-+++ korig/drivers/spi/spi_s3c24xx.c 2008-09-27 11:29:40.000000000 -0300
+--- korig.orig/drivers/spi/spi_s3c24xx.c 2008-09-27 21:32:30.000000000
-0300
++++ korig/drivers/spi/spi_s3c24xx.c 2008-09-27 22:27:20.000000000 -0300
@@ -198,6 +198,27 @@
writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT);
wait_for_completion(&hw->done);
@@ -39,7 +39,7 @@
return hw->count;
}
-@@ -233,8 +254,23 @@
+@@ -233,8 +254,19 @@
hw->count++;
@@ -49,12 +49,8 @@
+ * Misfeature #1: the first byte received can only be read after
+ * writing the second byte to send to the shifter.
+ *
-+ * Misfeature #2: we need to consume all data received.
-+ *
-+ * Oddly enough, it's not sufficient if we do a large number of SPRDAT
-+ * reads before or right after starting the transmission. We really
-+ * have to fetch a byte for each byte we send, or the SPI engine gets
-+ * upset.
++ * Misfeature #2: we need to consume the byte preceding the first byte
++ * or the SPI engine gets upset.
+ */
+ if (hw->rx) {
+ u8 b = readb(hw->regs + S3C2410_SPRDAT);
@@ -67,8 +63,8 @@
Index: korig/arch/arm/mach-s3c2440/mach-gta02.c
===================================================================
---- korig.orig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27
11:29:48.000000000 -0300
-+++ korig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27 11:30:13.000000000
-0300
+--- korig.orig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27
21:32:30.000000000 -0300
++++ korig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27 21:32:30.000000000
-0300
@@ -1239,7 +1239,7 @@
static struct spi_board_info gta02_spi_mmc_bdinfo = {
.modalias = "mmc_spi",
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-09-28 03:44:31 +0200 (Sun, 28 Sep 2008)
New Revision: 4677
Modified:
developers/werner/ahrt/host/tmc/lib/dxplore.py
Log:
Highlight:
- waveforms can be edited, e.g., to manually correct glitches
Details:
- lib/dxplore.py (main_window): key "e" (edit) changes the value of the sample
on the right side of the cursor
Modified: developers/werner/ahrt/host/tmc/lib/dxplore.py
===================================================================
--- developers/werner/ahrt/host/tmc/lib/dxplore.py 2008-09-28 01:42:31 UTC
(rev 4676)
+++ developers/werner/ahrt/host/tmc/lib/dxplore.py 2008-09-28 01:44:31 UTC
(rev 4677)
@@ -33,6 +33,8 @@
color_normal = "green"
color_selected = "yellow"
+ color_edit = "red"
+ edit_border = 2
decode_color = "white"
decode_bg_color = "#4040ff"
decode_font = "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*"
@@ -43,11 +45,22 @@
self.tag = "d_%d" % number
self.zoom_tag = "d_z_%d" % number
self.d = data
+ self.edits = []
self.draw()
def draw(self):
if self.main.pos0 > len(self.d):
return
+
+ for pos in self.edits:
+ if pos < self.main.pos0:
+ return
+ self.main.w.create_rectangle(
+ self.x(pos)-self.edit_border, self.y(0)+self.edit_border,
+ self.x(pos+1)+self.edit_border, self.y(1)-self.edit_border,
+ fill = self.color_edit, outline = self.color_edit,
+ tags = "d_ed_"+self.tag)
+
pos0 = max(0, self.main.pos0)
last = self.d[pos0]
line = [ self.x(pos0), self.y(last) ]
@@ -86,6 +99,7 @@
def redraw(self):
self.main.w.delete(self.tag)
+ self.main.w.delete("d_ed_"+self.tag)
self.draw()
def x(self, sample):
@@ -134,7 +148,15 @@
self.main.w.delete("d_fg_"+self.tag)
self.main.w.delete("d_bg_"+self.tag)
+ def edit(self, pos):
+ self.d[pos] = 1-self.d[pos]
+ if pos in self.edits:
+ self.edits.remove(pos)
+ else:
+ self.edits.append(pos)
+ self.redraw()
+
# Base class to have access to the pretty-printing methods.
class measurement_base:
@@ -429,6 +451,7 @@
master.bind("-", self.zoom_out)
master.bind(".", self.center)
master.bind("c", self.center)
+ master.bind("e", self.edit)
master.bind("<space>", self.user_coord)
def decoder_menu(self, master, ch, n):
@@ -678,6 +701,12 @@
self.decode_from = None
self.meas_start.hide()
+ def edit(self, event):
+ if self.selected is None:
+ return
+ self.selected.edit(self.cur.pos)
+ self.cur.move(self.cur.x)
+
class dxplore:
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-09-28 04:12:36 +0200 (Sun, 28 Sep 2008)
New Revision: 4678
Added:
developers/werner/wlan-spi/patches/s3c-spi-fix-int-mode.patch
developers/werner/wlan-spi/patches/s3c-spi-from-int-to-poll.patch
Removed:
developers/werner/wlan-spi/patches/tweak-spi.patch
Modified:
developers/werner/wlan-spi/patches/series
Log:
- renamed tweak-spi.patch to s3c-spi-fix-int-mode.patch
- s3c-spi-from-int-to-poll.patch: use poll mode instead of interrupt mode, for
a nice speedup
Copied: developers/werner/wlan-spi/patches/s3c-spi-fix-int-mode.patch (from rev
4676, developers/werner/wlan-spi/patches/tweak-spi.patch)
===================================================================
--- developers/werner/wlan-spi/patches/s3c-spi-fix-int-mode.patch
(rev 0)
+++ developers/werner/wlan-spi/patches/s3c-spi-fix-int-mode.patch
2008-09-28 02:12:36 UTC (rev 4678)
@@ -0,0 +1,76 @@
+Work in progress. Makes spi_s3c24xx.c work for up to 12MHz.
+
+At speeds of 13MHz or higher, we have setup time issues. I.e., the
+SPI host sees the data coming from the device delayed by one bit,
+even though things look fine on the scope.
+
+This 12MHz/13MHz "barrier" exists with or without probes attached,
+suggesting capacitative loading plays only a minor role in this.
+
+Index: korig/drivers/spi/spi_s3c24xx.c
+===================================================================
+--- korig.orig/drivers/spi/spi_s3c24xx.c 2008-09-27 21:32:30.000000000
-0300
++++ korig/drivers/spi/spi_s3c24xx.c 2008-09-27 22:27:20.000000000 -0300
+@@ -198,6 +198,27 @@
+ writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT);
+ wait_for_completion(&hw->done);
+
++ /*
++ * Get the last byte. Since we don't have more data we can send in
++ * order to clock the byte out of the SPI system, we need to wait.
++ *
++ * Duh, I'm just handwaving here about possible explanations of what's
++ * going on in the hardware. This is the voodoo ritual that makes it
++ * work while anything else fails.
++ */
++ if (hw->rx && hw->count) {
++ udelay(1+10*1000000/spi->max_speed_hz);
++ hw->rx[hw->count-1] = readb(hw->regs + S3C2410_SPRDAT);
++ }
++
++ if (0&&t->rx_buf && t->len > 18) {
++ int i;
++
++ printk(KERN_INFO "RX (%p):", t->rx_buf);
++ for (i = 0; i != t->len; i++)
++ printk(" %02x", ((u8 *) t->rx_buf)[i]);
++ printk("\n");
++ }
+ return hw->count;
+ }
+
+@@ -233,8 +254,19 @@
+
+ hw->count++;
+
+- if (hw->rx)
+- hw->rx[count] = readb(hw->regs + S3C2410_SPRDAT);
++ /*
++ * Misfeature #1: the first byte received can only be read after
++ * writing the second byte to send to the shifter.
++ *
++ * Misfeature #2: we need to consume the byte preceding the first byte
++ * or the SPI engine gets upset.
++ */
++ if (hw->rx) {
++ u8 b = readb(hw->regs + S3C2410_SPRDAT);
++
++ if (count)
++ hw->rx[count-1] = b;
++ }
+
+ count++;
+
+Index: korig/arch/arm/mach-s3c2440/mach-gta02.c
+===================================================================
+--- korig.orig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27
21:32:30.000000000 -0300
++++ korig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27 21:32:30.000000000
-0300
+@@ -1239,7 +1239,7 @@
+ static struct spi_board_info gta02_spi_mmc_bdinfo = {
+ .modalias = "mmc_spi",
+ .irq = IRQ_EINT3, /* unused ? */
+- .max_speed_hz = 25 * 1000 * 1000,
++ .max_speed_hz = 12 * 1000 * 1000, /* SPI doesn't want to go faster */
+ .bus_num = 0,
+ .chip_select = 0,
+ .mode = SPI_MODE_0,
Added: developers/werner/wlan-spi/patches/s3c-spi-from-int-to-poll.patch
===================================================================
--- developers/werner/wlan-spi/patches/s3c-spi-from-int-to-poll.patch
(rev 0)
+++ developers/werner/wlan-spi/patches/s3c-spi-from-int-to-poll.patch
2008-09-28 02:12:36 UTC (rev 4678)
@@ -0,0 +1,105 @@
+Change the S3C SPI driver to use poll mode instead of interrupt mode.
+This reduces the gap between bytes from about 2.25us [1] to 100ns [2].
+
+[1] http://people.openmoko.org/werner/wlan-spi/spi-int.png
+[2] http://people.openmoko.org/werner/wlan-spi/spi-poll.png
+
+Index: korig/drivers/spi/spi_s3c24xx.c
+===================================================================
+--- korig.orig/drivers/spi/spi_s3c24xx.c 2008-09-27 22:45:38.000000000
-0300
++++ korig/drivers/spi/spi_s3c24xx.c 2008-09-27 22:46:45.000000000 -0300
+@@ -56,7 +56,7 @@
+ struct s3c2410_spi_info *pdata;
+ };
+
+-#define SPCON_DEFAULT (S3C2410_SPCON_MSTR | S3C2410_SPCON_SMOD_INT)
++#define SPCON_DEFAULT (S3C2410_SPCON_MSTR | S3C2410_SPCON_SMOD_POLL)
+ #define SPPIN_DEFAULT (S3C2410_SPPIN_KEEP)
+
+ static inline struct s3c24xx_spi *to_hw(struct spi_device *sdev)
+@@ -183,6 +183,7 @@
+ static int s3c24xx_spi_txrx(struct spi_device *spi, struct spi_transfer *t)
+ {
+ struct s3c24xx_spi *hw = to_hw(spi);
++ int i;
+
+ dev_dbg(&spi->dev, "txrx: tx %p, rx %p, len %d\n",
+ t->tx_buf, t->rx_buf, t->len);
+@@ -194,9 +195,19 @@
+ hw->len = t->len;
+ hw->count = 0;
+
+- /* send the first byte */
+- writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT);
+- wait_for_completion(&hw->done);
++ for (i = 0; i != t->len; i++) {
++ u8 spsta;
++
++ writeb(hw_txbyte(hw, i), hw->regs + S3C2410_SPTDAT);
++ do spsta = readb(hw->regs + S3C2410_SPSTA);
++ while (!(spsta & S3C2410_SPSTA_READY));
++ if (hw->rx) {
++ u8 b = readb(hw->regs + S3C2410_SPRDAT);
++
++ if (i)
++ hw->rx[i-1] = b;
++ }
++ }
+
+ /*
+ * Get the last byte. Since we don't have more data we can send in
+@@ -206,9 +217,9 @@
+ * going on in the hardware. This is the voodoo ritual that makes it
+ * work while anything else fails.
+ */
+- if (hw->rx && hw->count) {
++ if (hw->rx && i) {
+ udelay(1+10*1000000/spi->max_speed_hz);
+- hw->rx[hw->count-1] = readb(hw->regs + S3C2410_SPRDAT);
++ hw->rx[i-1] = readb(hw->regs + S3C2410_SPRDAT);
+ }
+
+ if (0&&t->rx_buf && t->len > 18) {
+@@ -219,7 +230,7 @@
+ printk(" %02x", ((u8 *) t->rx_buf)[i]);
+ printk("\n");
+ }
+- return hw->count;
++ return t->len;
+ }
+
+ static irqreturn_t s3c24xx_spi_irq(int irq, void *dev)
+@@ -351,6 +362,7 @@
+ goto err_no_iomap;
+ }
+
++#if 0
+ hw->irq = platform_get_irq(pdev, 0);
+ if (hw->irq < 0) {
+ dev_err(&pdev->dev, "No IRQ specified\n");
+@@ -363,6 +375,7 @@
+ dev_err(&pdev->dev, "Cannot claim IRQ\n");
+ goto err_no_irq;
+ }
++#endif
+
+ hw->clk = clk_get(&pdev->dev, "spi");
+ if (IS_ERR(hw->clk)) {
+@@ -416,7 +429,7 @@
+ clk_put(hw->clk);
+
+ err_no_clk:
+- free_irq(hw->irq, hw);
++ //free_irq(hw->irq, hw);
+
+ err_no_irq:
+ iounmap(hw->regs);
+@@ -444,7 +457,7 @@
+ clk_disable(hw->clk);
+ clk_put(hw->clk);
+
+- free_irq(hw->irq, hw);
++ //free_irq(hw->irq, hw);
+ iounmap(hw->regs);
+
+ release_resource(hw->ioarea);
Modified: developers/werner/wlan-spi/patches/series
===================================================================
--- developers/werner/wlan-spi/patches/series 2008-09-28 01:44:31 UTC (rev
4677)
+++ developers/werner/wlan-spi/patches/series 2008-09-28 02:12:36 UTC (rev
4678)
@@ -25,6 +25,7 @@
ar6k-essid-one-and-32.patch
gta02-no-glamo-mmc.patch
hack-silence-battery.patch
-tweak-spi.patch
+s3c-spi-fix-int-mode.patch
+s3c-spi-from-int-to-poll.patch
#dont-poll-irq.patch
#try
Deleted: developers/werner/wlan-spi/patches/tweak-spi.patch
===================================================================
--- developers/werner/wlan-spi/patches/tweak-spi.patch 2008-09-28 01:44:31 UTC
(rev 4677)
+++ developers/werner/wlan-spi/patches/tweak-spi.patch 2008-09-28 02:12:36 UTC
(rev 4678)
@@ -1,76 +0,0 @@
-Work in progress. Makes spi_s3c24xx.c work for up to 12MHz.
-
-At speeds of 13MHz or higher, we have setup time issues. I.e., the
-SPI host sees the data coming from the device delayed by one bit,
-even though things look fine on the scope.
-
-This 12MHz/13MHz "barrier" exists with or without probes attached,
-suggesting capacitative loading plays only a minor role in this.
-
-Index: korig/drivers/spi/spi_s3c24xx.c
-===================================================================
---- korig.orig/drivers/spi/spi_s3c24xx.c 2008-09-27 21:32:30.000000000
-0300
-+++ korig/drivers/spi/spi_s3c24xx.c 2008-09-27 22:27:20.000000000 -0300
-@@ -198,6 +198,27 @@
- writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT);
- wait_for_completion(&hw->done);
-
-+ /*
-+ * Get the last byte. Since we don't have more data we can send in
-+ * order to clock the byte out of the SPI system, we need to wait.
-+ *
-+ * Duh, I'm just handwaving here about possible explanations of what's
-+ * going on in the hardware. This is the voodoo ritual that makes it
-+ * work while anything else fails.
-+ */
-+ if (hw->rx && hw->count) {
-+ udelay(1+10*1000000/spi->max_speed_hz);
-+ hw->rx[hw->count-1] = readb(hw->regs + S3C2410_SPRDAT);
-+ }
-+
-+ if (0&&t->rx_buf && t->len > 18) {
-+ int i;
-+
-+ printk(KERN_INFO "RX (%p):", t->rx_buf);
-+ for (i = 0; i != t->len; i++)
-+ printk(" %02x", ((u8 *) t->rx_buf)[i]);
-+ printk("\n");
-+ }
- return hw->count;
- }
-
-@@ -233,8 +254,19 @@
-
- hw->count++;
-
-- if (hw->rx)
-- hw->rx[count] = readb(hw->regs + S3C2410_SPRDAT);
-+ /*
-+ * Misfeature #1: the first byte received can only be read after
-+ * writing the second byte to send to the shifter.
-+ *
-+ * Misfeature #2: we need to consume the byte preceding the first byte
-+ * or the SPI engine gets upset.
-+ */
-+ if (hw->rx) {
-+ u8 b = readb(hw->regs + S3C2410_SPRDAT);
-+
-+ if (count)
-+ hw->rx[count-1] = b;
-+ }
-
- count++;
-
-Index: korig/arch/arm/mach-s3c2440/mach-gta02.c
-===================================================================
---- korig.orig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27
21:32:30.000000000 -0300
-+++ korig/arch/arm/mach-s3c2440/mach-gta02.c 2008-09-27 21:32:30.000000000
-0300
-@@ -1239,7 +1239,7 @@
- static struct spi_board_info gta02_spi_mmc_bdinfo = {
- .modalias = "mmc_spi",
- .irq = IRQ_EINT3, /* unused ? */
-- .max_speed_hz = 25 * 1000 * 1000,
-+ .max_speed_hz = 12 * 1000 * 1000, /* SPI doesn't want to go faster */
- .bus_num = 0,
- .chip_select = 0,
- .mode = SPI_MODE_0,
--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog