linux4sam/linux-at91 — pull request #8 by alexandermorozov (2014-12-01 15:03:59+00:00)
Title: Linux 3.15 at91 fixes

There are several distinct things in this merge request:

1) It brings back audio codec support on at91sama5x EK. It was lost somewhere near migration to 3.6.9. Just reapplying old patches by Bo Shen is not enough now, and several more fixes in DT and wm8904 driver are required. In addition to provided commits, `i2c0` and `sound` DT entries should be manually enabled, since `i2c0` uses some common pins with ISI and is codec is disabled by default. Also in current config all DMA0 channels are already used but are strictly required for SSC operation, so we also need to free two DMA channels. After e.g. following extra patch and proper menuconfig settings audio works (tested with `mplayer -ao oss`), but it's not very stable.

```
diff --git a/arch/arm/boot/dts/sama5d35ek.dts b/arch/arm/boot/dts/sama5d35ek.dts
index d58d2f4..b84d250 100644
--- a/arch/arm/boot/dts/sama5d35ek.dts
+++ b/arch/arm/boot/dts/sama5d35ek.dts
@@ -28,6 +28,11 @@
status = "okay";
};

+ i2c0: i2c@f0014000 {
+ dmas = <>; /* free two DMA channels for ssc0 */
+ status = "okay";
+ };
+
i2c1: i2c@f0018000 {
status = "okay";
};
@@ -58,4 +63,8 @@
gpio-key,wakeup;
};
};
+
+ sound {
+ status = "okay";
+ };
};
```

2) Added several missing DT definitions for various perepherals.

3) Fixes in clock code, UART and SPI drivers. UART fix deals with a rather obscure race condition. We run into problems with it while using high baud rates (>=230400) and "packet"-based protocol. Sometimes several last bytes of the packet were received and placed in ring buffer but not reported to TTY layer until more bytes arrived. In request-response protocols that means request timeout.