<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch, branch colibri</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ARM: 7670/1: fix the memset fix</title>
<updated>2014-07-28T16:19:49+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>nicolas.pitre@linaro.org</email>
</author>
<published>2013-03-12T12:00:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b2ec16b357ec3c965883737a3176fcf64e8a00d2'/>
<id>b2ec16b357ec3c965883737a3176fcf64e8a00d2</id>
<content type='text'>
Commit 455bd4c430b0 ("ARM: 7668/1: fix memset-related crashes caused by
recent GCC (4.7.2) optimizations") attempted to fix a compliance issue
with the memset return value.  However the memset itself became broken
by that patch for misaligned pointers.

This fixes the above by branching over the entry code from the
misaligned fixup code to avoid reloading the original pointer.

Also, because the function entry alignment is wrong in the Thumb mode
compilation, that fixup code is moved to the end.

While at it, the entry instructions are slightly reworked to help dual
issue pipelines.

Signed-off-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Tested-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 455bd4c430b0 ("ARM: 7668/1: fix memset-related crashes caused by
recent GCC (4.7.2) optimizations") attempted to fix a compliance issue
with the memset return value.  However the memset itself became broken
by that patch for misaligned pointers.

This fixes the above by branching over the entry code from the
misaligned fixup code to avoid reloading the original pointer.

Also, because the function entry alignment is wrong in the Thumb mode
compilation, that fixup code is moved to the end.

While at it, the entry instructions are slightly reworked to help dual
issue pipelines.

Signed-off-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Tested-by: Alexander Holler &lt;holler@ahsoftware.de&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations</title>
<updated>2014-07-28T16:19:09+00:00</updated>
<author>
<name>Ivan Djelic</name>
<email>ivan.djelic@parrot.com</email>
</author>
<published>2013-03-06T19:09:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c0fe2323296a99c0ad051e36d35de822fe948587'/>
<id>c0fe2323296a99c0ad051e36d35de822fe948587</id>
<content type='text'>
Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on
assumptions about the implementation of memset and similar functions.
The current ARM optimized memset code does not return the value of
its first argument, as is usually expected from standard implementations.

For instance in the following function:

void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
{
	memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
	waiter-&gt;magic = waiter;
	INIT_LIST_HEAD(&amp;waiter-&gt;list);
}

compiled as:

800554d0 &lt;debug_mutex_lock_common&gt;:
800554d0:       e92d4008        push    {r3, lr}
800554d4:       e1a00001        mov     r0, r1
800554d8:       e3a02010        mov     r2, #16 ; 0x10
800554dc:       e3a01011        mov     r1, #17 ; 0x11
800554e0:       eb04426e        bl      80165ea0 &lt;memset&gt;
800554e4:       e1a03000        mov     r3, r0
800554e8:       e583000c        str     r0, [r3, #12]
800554ec:       e5830000        str     r0, [r3]
800554f0:       e5830004        str     r0, [r3, #4]
800554f4:       e8bd8008        pop     {r3, pc}

GCC assumes memset returns the value of pointer 'waiter' in register r0; causing
register/memory corruptions.

This patch fixes the return value of the assembly version of memset.
It adds a 'mov' instruction and merges an additional load+store into
existing load/store instructions.
For ease of review, here is a breakdown of the patch into 4 simple steps:

Step 1
======
Perform the following substitutions:
ip -&gt; r8, then
r0 -&gt; ip,
and insert 'mov ip, r0' as the first statement of the function.
At this point, we have a memset() implementation returning the proper result,
but corrupting r8 on some paths (the ones that were using ip).

Step 2
======
Make sure r8 is saved and restored when (! CALGN(1)+0) == 1:

save r8:
-       str     lr, [sp, #-4]!
+       stmfd   sp!, {r8, lr}

and restore r8 on both exit paths:
-       ldmeqfd sp!, {pc}               @ Now &lt;64 bytes to go.
+       ldmeqfd sp!, {r8, pc}           @ Now &lt;64 bytes to go.
(...)
        tst     r2, #16
        stmneia ip!, {r1, r3, r8, lr}
-       ldr     lr, [sp], #4
+       ldmfd   sp!, {r8, lr}

Step 3
======
Make sure r8 is saved and restored when (! CALGN(1)+0) == 0:

save r8:
-       stmfd   sp!, {r4-r7, lr}
+       stmfd   sp!, {r4-r8, lr}

and restore r8 on both exit paths:
        bgt     3b
-       ldmeqfd sp!, {r4-r7, pc}
+       ldmeqfd sp!, {r4-r8, pc}
(...)
        tst     r2, #16
        stmneia ip!, {r4-r7}
-       ldmfd   sp!, {r4-r7, lr}
+       ldmfd   sp!, {r4-r8, lr}

Step 4
======
Rewrite register list "r4-r7, r8" as "r4-r8".

Signed-off-by: Ivan Djelic &lt;ivan.djelic@parrot.com&gt;
Reviewed-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Signed-off-by: Dirk Behme &lt;dirk.behme@gmail.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on
assumptions about the implementation of memset and similar functions.
The current ARM optimized memset code does not return the value of
its first argument, as is usually expected from standard implementations.

For instance in the following function:

void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
{
	memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
	waiter-&gt;magic = waiter;
	INIT_LIST_HEAD(&amp;waiter-&gt;list);
}

compiled as:

800554d0 &lt;debug_mutex_lock_common&gt;:
800554d0:       e92d4008        push    {r3, lr}
800554d4:       e1a00001        mov     r0, r1
800554d8:       e3a02010        mov     r2, #16 ; 0x10
800554dc:       e3a01011        mov     r1, #17 ; 0x11
800554e0:       eb04426e        bl      80165ea0 &lt;memset&gt;
800554e4:       e1a03000        mov     r3, r0
800554e8:       e583000c        str     r0, [r3, #12]
800554ec:       e5830000        str     r0, [r3]
800554f0:       e5830004        str     r0, [r3, #4]
800554f4:       e8bd8008        pop     {r3, pc}

GCC assumes memset returns the value of pointer 'waiter' in register r0; causing
register/memory corruptions.

This patch fixes the return value of the assembly version of memset.
It adds a 'mov' instruction and merges an additional load+store into
existing load/store instructions.
For ease of review, here is a breakdown of the patch into 4 simple steps:

Step 1
======
Perform the following substitutions:
ip -&gt; r8, then
r0 -&gt; ip,
and insert 'mov ip, r0' as the first statement of the function.
At this point, we have a memset() implementation returning the proper result,
but corrupting r8 on some paths (the ones that were using ip).

Step 2
======
Make sure r8 is saved and restored when (! CALGN(1)+0) == 1:

save r8:
-       str     lr, [sp, #-4]!
+       stmfd   sp!, {r8, lr}

and restore r8 on both exit paths:
-       ldmeqfd sp!, {pc}               @ Now &lt;64 bytes to go.
+       ldmeqfd sp!, {r8, pc}           @ Now &lt;64 bytes to go.
(...)
        tst     r2, #16
        stmneia ip!, {r1, r3, r8, lr}
-       ldr     lr, [sp], #4
+       ldmfd   sp!, {r8, lr}

Step 3
======
Make sure r8 is saved and restored when (! CALGN(1)+0) == 0:

save r8:
-       stmfd   sp!, {r4-r7, lr}
+       stmfd   sp!, {r4-r8, lr}

and restore r8 on both exit paths:
        bgt     3b
-       ldmeqfd sp!, {r4-r7, pc}
+       ldmeqfd sp!, {r4-r8, pc}
(...)
        tst     r2, #16
        stmneia ip!, {r4-r7}
-       ldmfd   sp!, {r4-r7, lr}
+       ldmfd   sp!, {r4-r8, lr}

Step 4
======
Rewrite register list "r4-r7, r8" as "r4-r8".

Signed-off-by: Ivan Djelic &lt;ivan.djelic@parrot.com&gt;
Reviewed-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Signed-off-by: Dirk Behme &lt;dirk.behme@gmail.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>apalis/colibri t20/t30: enable vlan functionality</title>
<updated>2014-07-26T00:21:10+00:00</updated>
<author>
<name>Marcel Ziswiler</name>
<email>marcel.ziswiler@toradex.com</email>
</author>
<published>2014-07-26T00:21:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f624a2114bf6f065f6836aa6da1a14291af2445b'/>
<id>f624a2114bf6f065f6836aa6da1a14291af2445b</id>
<content type='text'>
Enable VLAN networking functionality.

While at it also enable some more kernel modules for Apalis T30 PCIe
based devices like the Intel E1000E NICs, Intel IWLAGN Wi-Fi cards,
PCIe serial cards and XHCI based USB 3.0 controllers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable VLAN networking functionality.

While at it also enable some more kernel modules for Apalis T30 PCIe
based devices like the Intel E1000E NICs, Intel IWLAGN Wi-Fi cards,
PCIe serial cards and XHCI based USB 3.0 controllers.
</pre>
</div>
</content>
</entry>
<entry>
<title>apalis/colibri t30: use hda hdmi audio and split sound init</title>
<updated>2014-07-25T19:53:00+00:00</updated>
<author>
<name>Marcel Ziswiler</name>
<email>marcel.ziswiler@toradex.com</email>
</author>
<published>2014-07-25T19:53:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0ef8a43b078dc63d2f1bf69c9d6ee480bdcbb6e7'/>
<id>0ef8a43b078dc63d2f1bf69c9d6ee480bdcbb6e7</id>
<content type='text'>
Use HDA HDMI audio now on Colibri T30 as well allowing for up to 7.1
multi-channel playback. Split board sound initialisation between Apalis
and Colibri T30 in order to distinguish better between default SPDIF
being supported out-of-the-box on Apalis vs. this being an optional
feature for the Colibri. Therefore remove SPDIF for the Colibri T30.

While at it add csus clock required for vi_sensor camera master clock
on Apalis T30 and clk_out_2/extern2 for Colibri T30, fix debug UART1
initialisation, get rid of spurious CONFIG_SND_USB enable and further
clean-up both board platform data files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use HDA HDMI audio now on Colibri T30 as well allowing for up to 7.1
multi-channel playback. Split board sound initialisation between Apalis
and Colibri T30 in order to distinguish better between default SPDIF
being supported out-of-the-box on Apalis vs. this being an optional
feature for the Colibri. Therefore remove SPDIF for the Colibri T30.

While at it add csus clock required for vi_sensor camera master clock
on Apalis T30 and clk_out_2/extern2 for Colibri T30, fix debug UART1
initialisation, get rid of spurious CONFIG_SND_USB enable and further
clean-up both board platform data files.
</pre>
</div>
</content>
</entry>
<entry>
<title>apalis/colibri t20/t30: enable fhandle for systemd</title>
<updated>2014-07-25T09:27:12+00:00</updated>
<author>
<name>Marcel Ziswiler</name>
<email>marcel.ziswiler@toradex.com</email>
</author>
<published>2014-07-25T09:27:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=740730acf44eabb04a16f7468e4bc9843af5ee0f'/>
<id>740730acf44eabb04a16f7468e4bc9843af5ee0f</id>
<content type='text'>
Enable CONFIG_FHANDLE required for systemd &gt;= 209 according to

lists.freedesktop.org/archives/systemd-devel/2014-February/017362.html

While at it put them all 3 on par concerning ARM Errata configuration.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable CONFIG_FHANDLE required for systemd &gt;= 209 according to

lists.freedesktop.org/archives/systemd-devel/2014-February/017362.html

While at it put them all 3 on par concerning ARM Errata configuration.
</pre>
</div>
</content>
</entry>
<entry>
<title>apalis/colibri t20/t30: fix/introduce spi device controller data</title>
<updated>2014-07-22T15:32:18+00:00</updated>
<author>
<name>Marcel Ziswiler</name>
<email>marcel.ziswiler@toradex.com</email>
</author>
<published>2014-07-22T15:15:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=17714a865512ad8634bcc616c4e2e65f8fff2646'/>
<id>17714a865512ad8634bcc616c4e2e65f8fff2646</id>
<content type='text'>
Fix (Colibri) resp. introduce (Apalis) SPI device controller data to
properly use HW based chip select with one clock of setup and hold time
each for both MCP2515 CAN controller(s) as well as spidev.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix (Colibri) resp. introduce (Apalis) SPI device controller data to
properly use HW based chip select with one clock of setup and hold time
each for both MCP2515 CAN controller(s) as well as spidev.
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: tegra: use 1.8V quirk only on affected instances</title>
<updated>2014-07-21T12:26:21+00:00</updated>
<author>
<name>Stefan Agner</name>
<email>stefan.agner@toradex.com</email>
</author>
<published>2014-06-24T11:47:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=29b19ff42a7d4c609f824c13ca139eef7332ff1f'/>
<id>29b19ff42a7d4c609f824c13ca139eef7332ff1f</id>
<content type='text'>
The 1.8V quirk also affected the internal eMMC which disabled newer
modes such as SDR50, SDR104 and DDR50. This in turn lead to an
out of spec usage since the clock was still 50MHz.

By creating a no_1v8 field in the platform data we can now enable
this work around on a per-instance basis. Hence we enable the
quirk only on the controllers which are connected to the external
SD-slots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 1.8V quirk also affected the internal eMMC which disabled newer
modes such as SDR50, SDR104 and DDR50. This in turn lead to an
out of spec usage since the clock was still 50MHz.

By creating a no_1v8 field in the platform data we can now enable
this work around on a per-instance basis. Hence we enable the
quirk only on the controllers which are connected to the external
SD-slots.
</pre>
</div>
</content>
</entry>
<entry>
<title>arm: tegra3: PCIe Clock and Reset Conform to Specification</title>
<updated>2014-07-16T15:22:42+00:00</updated>
<author>
<name>Eric Yuen</name>
<email>eyuen@nvidia.com</email>
</author>
<published>2014-07-08T10:34:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ff09771639a39c834f364a75faa49bc44bac901e'/>
<id>ff09771639a39c834f364a75faa49bc44bac901e</id>
<content type='text'>
PCIe Reset line must be asserted for at least 100us after clock is enabled.
PEX 2 Controller Register fix, offsets are not at constant intervals.

Bug 1521306

Reviewed-on: http://git-master/r/225399
(cherry picked from commit df0760bf515236bed2e87e590509642ab72a01b5)
Change-Id: I7b44ea51e7e02f2bca93cfc75ed85e01ab91fe03
Signed-off-by: Shreshtha Sahu &lt;ssahu@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PCIe Reset line must be asserted for at least 100us after clock is enabled.
PEX 2 Controller Register fix, offsets are not at constant intervals.

Bug 1521306

Reviewed-on: http://git-master/r/225399
(cherry picked from commit df0760bf515236bed2e87e590509642ab72a01b5)
Change-Id: I7b44ea51e7e02f2bca93cfc75ed85e01ab91fe03
Signed-off-by: Shreshtha Sahu &lt;ssahu@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vi driver on Colibri T20 is working again</title>
<updated>2014-07-08T12:37:59+00:00</updated>
<author>
<name>Wojciech Bieganski</name>
<email>wbieganski@antmicro.com</email>
</author>
<published>2014-05-19T12:09:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8394112f246f808f9ff2961c7b19e2f48ba1df81'/>
<id>8394112f246f808f9ff2961c7b19e2f48ba1df81</id>
<content type='text'>
This commit resolves an issue of non-working vi camera driver
on Colibri T20 occured after a l4t-r16-r4 merge.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit resolves an issue of non-working vi camera driver
on Colibri T20 occured after a l4t-r16-r4 merge.
</pre>
</div>
</content>
</entry>
<entry>
<title>colibri t20/t30: add spi controller platform data for hw cs</title>
<updated>2014-05-09T12:43:07+00:00</updated>
<author>
<name>Marcel Ziswiler</name>
<email>marcel.ziswiler@toradex.com</email>
</author>
<published>2014-05-09T12:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=277321a36fcc2fde4baa61568b3b116e42a188e9'/>
<id>277321a36fcc2fde4baa61568b3b116e42a188e9</id>
<content type='text'>
Add SPI controller platform data required for use of hardware chip
selects.

While at it pull-up SPI chip select pin due to NVIDIA's designers
taking the term chip select a little too personal: they indeed only
select a chip otherwise all the chip select pins are just left
floating!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add SPI controller platform data required for use of hardware chip
selects.

While at it pull-up SPI chip select pin due to NVIDIA's designers
taking the term chip select a little too personal: they indeed only
select a chip otherwise all the chip select pins are just left
floating!
</pre>
</div>
</content>
</entry>
</feed>
