]> git.hungrycats.org Git - linux/log
linux
11 years agozygo: deploy-kernel: send kernel images to a Pi zygo-3.6.y-zbrpi
Zygo Blaxell [Wed, 16 Oct 2013 01:18:41 +0000 (21:18 -0400)]
zygo: deploy-kernel: send kernel images to a Pi

11 years agozygo: config: add softdog
Zygo Blaxell [Wed, 16 Oct 2013 01:08:31 +0000 (21:08 -0400)]
zygo: config: add softdog

11 years agozygo: fix path
Zygo Blaxell [Sat, 12 Oct 2013 21:00:41 +0000 (17:00 -0400)]
zygo: fix path

11 years agozygo: implement the rest of the instructions. Well, except the firmware bit.
Zygo Blaxell [Sat, 12 Oct 2013 03:51:48 +0000 (23:51 -0400)]
zygo: implement the rest of the instructions.  Well, except the firmware bit.

11 years agozygo: implement more instructions, part II
Zygo Blaxell [Mon, 2 Sep 2013 22:05:52 +0000 (18:05 -0400)]
zygo: implement more instructions, part II

11 years agozygo: make menuconfig for 3.6.11-zbrpi
Zygo Blaxell [Mon, 2 Sep 2013 21:55:16 +0000 (17:55 -0400)]
zygo: make menuconfig for 3.6.11-zbrpi

11 years agozygo: implement more instructions
Zygo Blaxell [Mon, 2 Sep 2013 21:43:03 +0000 (17:43 -0400)]
zygo: implement more instructions

11 years agozygo: fix CCPREFIX
Zygo Blaxell [Mon, 2 Sep 2013 21:41:24 +0000 (17:41 -0400)]
zygo: fix CCPREFIX

11 years agozygo: .config from Raspberry Pi reference 2013-05-25 (armhf)
Zygo Blaxell [Mon, 2 Sep 2013 21:39:57 +0000 (17:39 -0400)]
zygo: .config from Raspberry Pi reference 2013-05-25 (armhf)

11 years agozygo: port to Raspberry Pi (http://elinux.org/RPi_Kernel_Compilation)
Zygo Blaxell [Mon, 2 Sep 2013 21:38:35 +0000 (17:38 -0400)]
zygo: port to Raspberry Pi (http://elinux.org/RPi_Kernel_Compilation)

11 years agoMerge pull request #390 from P33M/rpi-3.6.y
popcornmix [Wed, 2 Oct 2013 17:29:10 +0000 (10:29 -0700)]
Merge pull request #390 from P33M/rpi-3.6.y

dwc_otg: Don't issue traffic to LS devices in FS mode

11 years agodwc_otg: Don't issue traffic to LS devices in FS mode
P33M [Fri, 27 Sep 2013 13:42:24 +0000 (14:42 +0100)]
dwc_otg: Don't issue traffic to LS devices in FS mode

Issuing low-speed packets when the root port is in full-speed mode
causes the root port to stop responding. Explicitly fail when
enqueuing URBs to a LS endpoint on a FS bus.

11 years agoAdd AppleTalk module
popcornmix [Fri, 27 Sep 2013 10:12:32 +0000 (11:12 +0100)]
Add AppleTalk module

11 years agodwc_otg: Fix for occasional lockup on boot when doing a USB reset
popcornmix [Fri, 20 Sep 2013 18:07:56 +0000 (19:07 +0100)]
dwc_otg: Fix for occasional lockup on boot when doing a USB reset

11 years agoAdd Ubiquiti WifiStation USB id to ath9k wifi driver
popcornmix [Sun, 8 Sep 2013 09:33:51 +0000 (10:33 +0100)]
Add Ubiquiti WifiStation USB id to ath9k wifi driver

11 years agoMerge pull request #380 from P33M/rpi-3.6.y
popcornmix [Fri, 20 Sep 2013 16:18:52 +0000 (09:18 -0700)]
Merge pull request #380 from P33M/rpi-3.6.y

dwc_otg: Enable NAK holdoff for control split transactions

11 years agodwc_otg: Enable NAK holdoff for control split transactions
P33M [Fri, 20 Sep 2013 15:08:27 +0000 (16:08 +0100)]
dwc_otg: Enable NAK holdoff for control split transactions

Certain low-speed devices take a very long time to complete a
data or status stage of a control transaction, producing NAK
responses until they complete internal processing - the USB2.0
spec limit is up to 500mS. This causes the same type of interrupt
storm as seen with USB-serial dongles prior to c8edb238.

In certain circumstances, usually while booting, this interrupt
storm could cause SD card timeouts.

11 years agoAdd new config options: CPU_FREQ_STAT_DETAILS, DUMMY, QFMT_V1, QFMT_V2, DLM
popcornmix [Sat, 7 Sep 2013 18:09:47 +0000 (19:09 +0100)]
Add new config options: CPU_FREQ_STAT_DETAILS, DUMMY, QFMT_V1, QFMT_V2, DLM

11 years agoSupport for cheap Ralink 3070 WiFi plug
popcornmix [Sat, 7 Sep 2013 18:07:33 +0000 (19:07 +0100)]
Support for cheap Ralink 3070 WiFi plug

See: https://github.com/raspberrypi/linux/pull/321

11 years agoEnable CONFIG_COMPACTION and move to SLUB memory allocator.
popcornmix [Fri, 30 Aug 2013 18:01:56 +0000 (19:01 +0100)]
Enable CONFIG_COMPACTION and move to SLUB memory allocator.
See: https://github.com/raspberrypi/linux/pull/349

11 years agoMerge pull request #362 from lurch/patch-1
popcornmix [Fri, 23 Aug 2013 10:48:41 +0000 (03:48 -0700)]
Merge pull request #362 from lurch/patch-1

Replace magic number with its #define name

11 years agoReplace magic number with its #define name
Andrew Scheller [Thu, 22 Aug 2013 18:31:53 +0000 (19:31 +0100)]
Replace magic number with its #define name

11 years agoChanges for new NOOBS multi partition booting from gsh
popcornmix [Mon, 19 Aug 2013 14:21:22 +0000 (15:21 +0100)]
Changes for new NOOBS multi partition booting from gsh

11 years agoIncrease to CONFIG_MMC_BLOCK_MINORS=32
popcornmix [Thu, 15 Aug 2013 14:13:51 +0000 (15:13 +0100)]
Increase to CONFIG_MMC_BLOCK_MINORS=32
and enable CONFIG_JUMP_LABEL
See: https://github.com/raspberrypi/linux/pull/348

11 years agoMerge pull request #352 from P33M/rpi-3.6.y
popcornmix [Wed, 7 Aug 2013 14:48:42 +0000 (07:48 -0700)]
Merge pull request #352 from P33M/rpi-3.6.y

dwc_otg: root port and FIQ bugfixes

11 years agodwc_otg: prevent crashes on host port disconnects
P33M [Mon, 5 Aug 2013 10:47:12 +0000 (11:47 +0100)]
dwc_otg: prevent crashes on host port disconnects

Fix several issues resulting in crashes or inconsistent state
if a Model A root port was disconnected.

- Clean up queue heads properly in kill_urbs_in_qh_list by
  removing the empty QHs from the schedule lists
- Set the halt status properly to prevent IRQ handlers from
  using freed memory
- Add fiq_split related cleanup for saved registers
- Make microframe scheduling reclaim host channels if
  active during a disconnect
- Abort URBs with -ESHUTDOWN status response, informing
  device drivers so they respond in a more correct fashion
  and don't try to resubmit URBs
- Prevent IRQ handlers from attempting to handle channel
  interrupts if the associated URB was dequeued (and the
  driver state was cleared)

11 years agodwc_otg: prevent leaking URBs during enqueue
P33M [Mon, 5 Aug 2013 12:17:58 +0000 (13:17 +0100)]
dwc_otg: prevent leaking URBs during enqueue

A dwc_otg_urb would get leaked if the HCD enqueue function
failed for any reason. Free the URB at the appropriate points.

11 years agodwc_otg: make fiq_split_enable imply fiq_fix_enable
P33M [Mon, 5 Aug 2013 10:42:12 +0000 (11:42 +0100)]
dwc_otg: make fiq_split_enable imply fiq_fix_enable

Failing to set up the FIQ correctly would result in
"IRQ 32: nobody cared" errors in dmesg.

11 years agoMerge pull request #347 from P33M/rpi-3.6.y
P33M [Fri, 2 Aug 2013 09:16:47 +0000 (02:16 -0700)]
Merge pull request #347 from P33M/rpi-3.6.y

dwc_otg: fix potential sleep while atomic during urb enqueue

11 years agodwc_otg: fix potential sleep while atomic during urb enqueue
P33M [Fri, 2 Aug 2013 09:04:18 +0000 (10:04 +0100)]
dwc_otg: fix potential sleep while atomic during urb enqueue

Fixes a regression introduced with eb1b482a. Kmalloc called from
dwc_otg_hcd_qtd_add / dwc_otg_hcd_qtd_create did not always have
the GPF_ATOMIC flag set. Force this flag when inside the larger
critical section.

11 years agovchiq_util: Fix race condition in push/pop
Philip Taylor [Tue, 28 May 2013 16:20:49 +0000 (17:20 +0100)]
vchiq_util: Fix race condition in push/pop

The lack of memory barriers could (very rarely) result in
vchiu_queue_pop reading the next value before it had been written
(getting either NULL, or a value that had been popped once already).

11 years agoVCHIQ: Fix mem leak of USER_SERVICE_T objects.
Matthew Hails [Mon, 13 May 2013 13:22:48 +0000 (14:22 +0100)]
VCHIQ: Fix mem leak of USER_SERVICE_T objects.

The userdata for VCHIQ services created through the ioctl API is
a kmalloced structure. These objects were getting leaked, most
notably in vchiq_release(), where the service could be closed,
freed and removed from the service list before the wait-to-die
loop was entered.

This change adds a userdata termination callback, and implements
it in the case where USER_SERVICE_T is used for the service
userdata.

11 years agoMerge pull request #344 from P33M/rpi-3.6.y
popcornmix [Tue, 30 Jul 2013 21:59:37 +0000 (14:59 -0700)]
Merge pull request #344 from P33M/rpi-3.6.y

dwc_otg: fiq_split: use TTs with more granularity

11 years agodwc_otg: fiq_split: use TTs with more granularity
P33M [Tue, 30 Jul 2013 08:58:48 +0000 (09:58 +0100)]
dwc_otg: fiq_split: use TTs with more granularity

This fixes certain issues with split transaction scheduling.

- Isochronous multi-packet OUT transactions now hog the TT until
  they are completed - this prevents hubs aborting transactions
  if they get a periodic start-split out-of-order
- Don't perform TT allocation on non-periodic endpoints - this
  allows simultaneous use of the TT's bulk/control and periodic
  transaction buffers

This commit will mainly affect USB audio playback.

11 years agoMerge pull request #340 from P33M/rpi-3.6.y
popcornmix [Sat, 27 Jul 2013 17:51:24 +0000 (10:51 -0700)]
Merge pull request #340 from P33M/rpi-3.6.y

dwc_otg: make channel halts with unknown state less damaging

11 years agodwc_otg: make channel halts with unknown state less damaging
P33M [Tue, 23 Jul 2013 13:15:32 +0000 (14:15 +0100)]
dwc_otg: make channel halts with unknown state less damaging

If the IRQ received a channel halt interrupt through the FIQ
with no other bits set, the IRQ would not release the host
channel and never complete the URB.

Add catchall handling to treat as a transaction error and retry.

11 years agoMerge pull request #337 from P33M/rpi-3.6.y
popcornmix [Mon, 22 Jul 2013 13:54:12 +0000 (06:54 -0700)]
Merge pull request #337 from P33M/rpi-3.6.y

dwc_otg: prevent BUG() in TT allocation if hub address is > 16

11 years agodwc_otg: prevent BUG() in TT allocation if hub address is > 16
P33M [Mon, 22 Jul 2013 13:08:26 +0000 (14:08 +0100)]
dwc_otg: prevent BUG() in TT allocation if hub address is > 16

A fixed-size array is used to track TT allocation. This was
previously set to 16 which caused a crash because
dwc_otg_hcd_allocate_port would read past the end of the array.

This was hit if a hub was plugged in which enumerated as addr > 16,
due to previous device resets or unplugs.

Also add #ifdef FIQ_DEBUG around hcd->hub_port_alloc[], which grows
to a large size if 128 hub addresses are supported. This field is
for debug only for tracking which frame an allocate happened in.

11 years agoMerge pull request #334 from P33M/rpi-3.6.y
popcornmix [Fri, 19 Jul 2013 17:59:30 +0000 (10:59 -0700)]
Merge pull request #334 from P33M/rpi-3.6.y

dwc_otg: prevent OOPSes during device disconnects

11 years agodwc_otg: prevent OOPSes during device disconnects
P33M [Thu, 18 Jul 2013 16:07:26 +0000 (17:07 +0100)]
dwc_otg: prevent OOPSes during device disconnects

The dwc_otg_urb_enqueue function is thread-unsafe. In particular the
access of urb->hcpriv, usb_hcd_link_urb_to_ep, dwc_otg_urb->qtd and
friends does not occur within a critical section and so if a device
was unplugged during activity there was a high chance that the
usbcore hub_thread would try to disable the endpoint with partially-
formed entries in the URB queue. This would result in BUG() or null
pointer dereferences.

Fix so that access of urb->hcpriv, enqueuing to the hardware and
adding to usbcore endpoint URB lists is contained within a single
critical section.

11 years agodwc_otg: whitespace cleanup in dwc_otg_urb_enqueue
P33M [Thu, 18 Jul 2013 15:32:41 +0000 (16:32 +0100)]
dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue

11 years agodwc_otg: fiq: prevent FIQ thrash and incorrect state passing to IRQ
P33M [Sat, 13 Jul 2013 20:48:41 +0000 (21:48 +0100)]
dwc_otg: fiq: prevent FIQ thrash and incorrect state passing to IRQ

In the case of a transaction to a device that had previously aborted
due to an error, several interrupts are enabled to reset the error
count when a device responds. This has the side-effect of making the
FIQ thrash because the hardware will generate multiple instances of
a NAK on an IN bulk/interrupt endpoint and multiple instances of ACK
on an OUT bulk/interrupt endpoint. Make the FIQ mask and clear the
associated interrupts.

Additionally, on non-split transactions make sure that only unmasked
interrupts are cleared. This caused a hard-to-trigger but serious
race condition when you had the combination of an endpoint awaiting
error recovery and a transaction completed on an endpoint - due to
the sequencing and timing of interrupts generated by the dwc_otg core,
it was possible to confuse the IRQ handler.

11 years agodwc_otg: mask correct interrupts after transaction error recovery
P33M [Sat, 13 Jul 2013 19:41:26 +0000 (20:41 +0100)]
dwc_otg: mask correct interrupts after transaction error recovery

The dwc_otg driver will unmask certain interrupts on a transaction
that previously halted in the error state in order to reset the
QTD error count. The various fine-grained interrupt handlers do not
consider that other interrupts besides themselves were unmasked.

By disabling the two other interrupts only ever enabled in DMA mode
for this purpose, we can avoid unnecessary function calls in the
IRQ handler. This will also prevent an unneccesary FIQ interrupt
from being generated if the FIQ is enabled.

11 years agosdhci-bcm2807: Increase sync_after_dma timeout
popcornmix [Wed, 10 Jul 2013 22:53:31 +0000 (23:53 +0100)]
sdhci-bcm2807: Increase sync_after_dma timeout

The current timeout is being hit with some cards that complete successfully with a longer timeout.
The timeout is not handled well, and is believed to be a code path that causes corruption.
872a8ff suggests that crappy cards can take up to 3 seconds to respond

12 years agoFix function tracing
Gordon Hollingworth [Mon, 8 Jul 2013 03:12:19 +0000 (04:12 +0100)]
Fix function tracing

11 years agoMerge pull request #330 from P33M/rpi-3.6.y
popcornmix [Tue, 16 Jul 2013 14:55:42 +0000 (07:55 -0700)]
Merge pull request #330 from P33M/rpi-3.6.y

dwc_otg: more robust interrupt handling

11 years agodcw_otg: avoid logging function that can cause panics
popcornmix [Mon, 15 Jul 2013 22:55:52 +0000 (23:55 +0100)]
dcw_otg: avoid logging function that can cause panics

See: https://github.com/raspberrypi/firmware/issues/21
Thanks to cleverca22 for fix

12 years agoMerge pull request #283 from rwg0/bluetooth-oops-fix
popcornmix [Thu, 4 Jul 2013 12:08:49 +0000 (05:08 -0700)]
Merge pull request #283 from rwg0/bluetooth-oops-fix

Fix kernel oops in l2cap_chan_destroy.

12 years agoUSB fix using a FIQ to implement split transactions
Gordon Hollingworth [Thu, 4 Apr 2013 10:05:21 +0000 (11:05 +0100)]
USB fix using a FIQ to implement split transactions

This commit adds a FIQ implementaion that schedules
the split transactions using a FIQ so we don't get
held off by the interrupt latency of Linux

12 years agoARM: 7670/1: fix the memset fix
Nicolas Pitre [Tue, 12 Mar 2013 12:00:42 +0000 (13:00 +0100)]
ARM: 7670/1: fix the memset fix

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 <nico@linaro.org>
Tested-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations
Ivan Djelic [Wed, 6 Mar 2013 19:09:27 +0000 (20:09 +0100)]
ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations

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->magic = waiter;
INIT_LIST_HEAD(&waiter->list);
}

compiled as:

800554d0 <debug_mutex_lock_common>:
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 <memset>
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 -> r8, then
r0 -> 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 <64 bytes to go.
+       ldmeqfd sp!, {r8, pc}           @ Now <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 <ivan.djelic@parrot.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMerge pull request #312 from wmdb/rpi-3.6.y
popcornmix [Sun, 23 Jun 2013 11:01:42 +0000 (04:01 -0700)]
Merge pull request #312 from wmdb/rpi-3.6.y

dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock held in completion ta...

12 years agoMerge pull request #314 from hglm/cfbimageblit
popcornmix [Sat, 22 Jun 2013 11:50:04 +0000 (04:50 -0700)]
Merge pull request #314 from hglm/cfbimageblit

Speed up framebuffer console text rendering

12 years agoSpeed up console framebuffer imageblit function
Harm Hanemaaijer [Thu, 20 Jun 2013 18:21:39 +0000 (20:21 +0200)]
Speed up console framebuffer imageblit function

Especially on platforms with a slower CPU but a relatively high
framebuffer fill bandwidth, like current ARM devices, the existing
console monochrome imageblit function used to draw console text is
suboptimal for common pixel depths such as 16bpp and 32bpp. The existing
code is quite general and can deal with several pixel depths. By creating
special case functions for 16bpp and 32bpp, by far the most common pixel
formats used on modern systems, a significant speed-up is attained
which can be readily felt on ARM-based devices like the Raspberry Pi
and the Allwinner platform, but should help any platform using the
fb layer.

The special case functions allow constant folding, eliminating a number
of instructions including divide operations, and allow the use of an
unrolled loop, eliminating instructions with a variable shift size,
reducing source memory access instructions, and eliminating excessive
branching. These unrolled loops also allow much better code optimization
by the C compiler. The code that selects which optimized variant is used
is also simplified, eliminating integer divide instructions.

The speed-up, measured by timing 'cat file.txt' in the console, varies
between 40% and 70%, when testing on the Raspberry Pi and Allwinner
ARM-based platforms, depending on font size and the pixel depth, with
the greater benefit for 32bpp.

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>
12 years agodwc_otg: Call usb_hcd_unlink_urb_from_ep with lock held in completion handler
Mike Bradley [Mon, 17 Jun 2013 18:31:42 +0000 (11:31 -0700)]
dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock held in completion handler

usb_hcd_unlink_urb_from_ep must be called with the HCD lock held.  Calling it
asynchronously in the tasklet was not safe (regression in
c4564d4a1a0a9b10d4419e48239f5d99e88d2667).

This change unlinks it from the endpoint prior to queueing it for handling in
the tasklet, and also adds a check to ensure the urb is OK to be unlinked
before doing so.

NULL pointer dereference kernel oopses had been observed in usb_hcd_giveback_urb
when a USB device was unplugged/replugged during data transfer.  This effect
was reproduced using automated USB port power control, hundreds of replug
events were performed during active transfers to confirm that the problem was
eliminated.

12 years agodma: Allow bulk dma channel to be requested
popcornmix [Wed, 19 Jun 2013 18:57:14 +0000 (19:57 +0100)]
dma: Allow bulk dma channel to be requested

12 years agoAvoid responding to unexpected I2C interrupts
popcornmix [Thu, 13 Jun 2013 15:46:54 +0000 (16:46 +0100)]
Avoid responding to unexpected I2C interrupts

12 years agoOnly init gpio pins of selected i2c bus
popcornmix [Sat, 8 Jun 2013 21:14:13 +0000 (22:14 +0100)]
Only init gpio pins of selected i2c bus

12 years agoAdd USB_PRINTER config option
popcornmix [Mon, 3 Jun 2013 20:52:45 +0000 (21:52 +0100)]
Add USB_PRINTER config option

12 years agortl8192cu: select required config options to allow builds without other wifi modules...
popcornmix [Fri, 31 May 2013 13:50:09 +0000 (14:50 +0100)]
rtl8192cu: select required config options to allow builds without other wifi modules. Thanks UrsusArctos

12 years agoMerge pull request #297 from hutorny/bcm2708-spidev
popcornmix [Tue, 28 May 2013 21:30:45 +0000 (14:30 -0700)]
Merge pull request #297 from hutorny/bcm2708-spidev

Update bcm2708.c to use CONFIG_BCM2708_SPIDEV rather than CONFIG_SPI

12 years agoAdd missing ids for Netgear WNA1000N and D-Link Alpha
popcornmix [Fri, 17 May 2013 14:19:49 +0000 (15:19 +0100)]
Add missing ids for Netgear WNA1000N and D-Link Alpha

12 years agoAllow reboot=q on command line to set a flag that bootcode.bin can use to boot from...
popcornmix [Tue, 14 May 2013 10:42:25 +0000 (11:42 +0100)]
Allow reboot=q on command line to set a flag that bootcode.bin can use to boot from alternate partition

12 years agoUpdate bcm2708.c to use CONFIG_BCM2708_SPIDEV rather than CONFIG_SPI
hutorny [Mon, 13 May 2013 07:26:14 +0000 (10:26 +0300)]
Update bcm2708.c to use CONFIG_BCM2708_SPIDEV rather than CONFIG_SPI

12 years agommc: suppress sdcard warnings we are happy about by default
popcornmix [Fri, 10 May 2013 18:42:38 +0000 (19:42 +0100)]
mmc: suppress sdcard warnings we are happy about by default

12 years agoVCHIQ: Use unsigned integers for unsigned values
popcornmix [Tue, 7 May 2013 15:10:45 +0000 (16:10 +0100)]
VCHIQ: Use unsigned integers for unsigned values

The VCHIQ interface used signed integers for values which are
inherently unsigned. Worse, the parameter validation code treated them
as if they were unsigned, checking for overflow but not underflow.

This patch converts those integers to unsigned integers.

Thanks to Jann Horn.

12 years agoAdd quick config.
popcornmix [Tue, 7 May 2013 21:20:24 +0000 (22:20 +0100)]
Add quick config.

This is designed for quick compiling when developing.
No modules are needed and it includes all Pi specific drivers

12 years agoMerge pull request #286 from martinezjavier/rpi-3.6.y-dev
popcornmix [Fri, 26 Apr 2013 17:08:31 +0000 (10:08 -0700)]
Merge pull request #286 from martinezjavier/rpi-3.6.y-dev

add mmap support and some cleanups to bcm2835 ALSA driver

12 years agoFix kernel oops in l2cap_chan_destroy. Based on https://github.com/torvalds/linux...
rwg0 [Thu, 25 Apr 2013 20:50:39 +0000 (13:50 -0700)]
Fix kernel oops in l2cap_chan_destroy. Based on https://github.com/torvalds/linux/commit/4af66c691f4e5c2db9bb00793669a548e9db1974

12 years agoALSA: bcm2835: add memory-mapped I/O mode for audio stream
Javier Martinez Canillas [Sat, 20 Apr 2013 00:31:56 +0000 (02:31 +0200)]
ALSA: bcm2835: add memory-mapped I/O mode for audio stream

ALSA supports two transfers methods for PCM playback: Read/Write
transfer where samples are writtern to the device using standard
read and write functions and Direct Read/Write transfers where
samples can be written directly to a mapped memory area and the
driver is signaled once this has been done.

The bcm2835 driver only supported Read/Write transfer method so
this patch adds mmap support to the driver.

The ARM CPU is not able to directly address the audio device
hardware buffer so audio samples are sent to the device using
a message passing interface (vchiq).

Since hardware buffers can't be directly mapped to user-space
memory, an intermediate buffer (using the PCM indirect API) is
needed to store the audio samples and push them to the device
through videocore.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
12 years agoALSA: bcm2835: defer bcm2835 PCM write using the workqueue
Javier Martinez Canillas [Thu, 25 Apr 2013 14:45:25 +0000 (16:45 +0200)]
ALSA: bcm2835: defer bcm2835 PCM write using the workqueue

Only PCM playback and stop are deferred using a workqueue on
the ALSA bcm2835 driver. The actual writing of PCM samples
is synchronous.

This works well for the read/write transfer method since
the snd_pcm_ops .copy function pointer runs on process context.

But the snd_pcm_ops .ack function pointer used to implement
direct read/write transfer using a memory-mapped I/O, runs
with interrupts disabled. Since the Kernel to VideoCore
interface driver has to be able to sleep, PCM write has to be
deferred to in preparation to add mmap support to the driver.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
12 years agoALSA: bcm2835: don't use magic numbers on audio start/stop workqueue
Javier Martinez Canillas [Wed, 24 Apr 2013 11:40:53 +0000 (13:40 +0200)]
ALSA: bcm2835: don't use magic numbers on audio start/stop workqueue

The bcm2835 driver uses a workqueue to defer PCM playback start
and stop. Commands are passed to the function as magic numbers
so is more readable to use macro constants.

Also, while being there change the generic name "x" to "cmd"
for the var used to pass the start/stop commands.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
12 years agoALSA: bcm2835: use a completion instead of a semaphore for sync
Javier Martinez Canillas [Wed, 24 Apr 2013 21:11:24 +0000 (23:11 +0200)]
ALSA: bcm2835: use a completion instead of a semaphore for sync

The kernel completion interface is a simple synchronization
mechanism that is preferable over semaphores to signal the
occurence of an event.

Semaphores are optimized for the non-contention case since
in most situations they will be available. But the wait for
completion is the opposite case since the code calling down
will wait on most cases.

So, is better to use the completion mechanism that has been
developed for this exact use case instead of semaphores.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
12 years agoALSA: bcm2835: show card and subdev creation msg only on debug
Javier Martinez Canillas [Thu, 25 Apr 2013 15:23:55 +0000 (17:23 +0200)]
ALSA: bcm2835: show card and subdev creation msg only on debug

On driver probe a message showing that a card and its subdevices
have been created is shown. Probably this message is not needed
unless we have debug enabled on the driver. So, use the driver
audio_info() debug macro instead of just printk().

Also is better to use dev_err() and pr_err() instead KERN_ERR.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
12 years agoMerge pull request #279 from P33M/rpi-3.6.y
popcornmix [Mon, 22 Apr 2013 15:08:49 +0000 (08:08 -0700)]
Merge pull request #279 from P33M/rpi-3.6.y

dwc_otg: fix NAK holdoff and allow on split transactions only

12 years agodwc_otg: fix NAK holdoff and allow on split transactions only
P33M [Sun, 21 Apr 2013 23:08:36 +0000 (00:08 +0100)]
dwc_otg: fix NAK holdoff and allow on split transactions only

This corrects a bug where if a single active non-periodic endpoint
had at least one transaction in its qh, on frnum == MAX_FRNUM the qh
would get skipped and never get queued again. This would result in
a silent device until error detection (automatic or otherwise) would
either reset the device or flush and requeue the URBs.

Additionally the NAK holdoff was enabled for all transactions - this
would potentially stall a HS endpoint for 1ms if a previous error state
enabled this interrupt and the next response was a NAK. Fix so that
only split transactions get held off.

12 years agodefconfig: Add CRYPTO_NULL, CRYPTO_USER, CRYPTO_CRYPTD modules
popcornmix [Wed, 17 Apr 2013 17:27:10 +0000 (18:27 +0100)]
defconfig: Add CRYPTO_NULL, CRYPTO_USER, CRYPTO_CRYPTD modules

12 years agoAdd IP_VS modules to kernel
popcornmix [Thu, 11 Apr 2013 13:27:12 +0000 (14:27 +0100)]
Add IP_VS modules to kernel

12 years agoUpdate rtl8192cu driver to 3.4.4_4749
popcornmix [Mon, 8 Apr 2013 16:19:24 +0000 (17:19 +0100)]
Update rtl8192cu driver to 3.4.4_4749

12 years agow1: fix oops when w1_search is called from netlink connector
Marcin Jurkowski [Sat, 2 Mar 2013 13:50:15 +0000 (14:50 +0100)]
w1: fix oops when w1_search is called from netlink connector

On Sat, Mar 02, 2013 at 10:45:10AM +0100, Sven Geggus wrote:
> This is the bad commit I found doing git bisect:
04f482faf50535229a5a5c8d629cf963899f857c is the first bad commit
> commit 04f482faf50535229a5a5c8d629cf963899f857c
> Author: Patrick McHardy <kaber@trash.net>
> Date:   Mon Mar 28 08:39:36 2011 +0000

Good job. I was too lazy to bisect for bad commit;)

Reading the code I found problematic kthread_should_stop call from netlink
connector which causes the oops. After applying a patch, I've been testing
owfs+w1 setup for nearly two days and it seems to work very reliable (no
hangs, no memleaks etc).
More detailed description and possible fix is given below:

Function w1_search can be called from either kthread or netlink callback.
While the former works fine, the latter causes oops due to kthread_should_stop
invocation.

This patch adds a check if w1_search is serving netlink command, skipping
kthread_should_stop invocation if so.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Josh Boyer <jwboyer@gmail.com>
Tested-by: Sven Geggus <lists@fuchsschwanzdomain.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org> # 3.0+
12 years agoRevert back to smaller alsa buffer
popcornmix [Tue, 2 Apr 2013 21:32:30 +0000 (22:32 +0100)]
Revert back to smaller alsa buffer

12 years agoMove definition of fiq_fix_enable to bcm2708.c to allow building without dwc_otg
popcornmix [Tue, 2 Apr 2013 12:53:40 +0000 (13:53 +0100)]
Move definition of fiq_fix_enable to bcm2708.c to allow building without dwc_otg

12 years agoRevert "ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimiza...
popcornmix [Fri, 29 Mar 2013 19:22:41 +0000 (19:22 +0000)]
Revert "ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations"

This reverts commit 690c641b4aeefa1df72ae783613afcb6b8ae7347.

There have been various reports of FAT partition corruption following this commit. Reverting for now to see if things improve.

12 years agoMerge pull request #255 from P33M/rpi-3.6.y
popcornmix [Sun, 24 Mar 2013 19:01:43 +0000 (12:01 -0700)]
Merge pull request #255 from P33M/rpi-3.6.y

dwc_otg: implement tasklet for returning URBs to usbcore hcd layer

12 years agoMerge pull request #258 from abzieher/rpi-3.6.y
popcornmix [Sun, 24 Mar 2013 19:00:35 +0000 (12:00 -0700)]
Merge pull request #258 from abzieher/rpi-3.6.y

Added Device IDs for August DVB-T 205

12 years agoMerge pull request #202 from notro/LoSSI
popcornmix [Sun, 24 Mar 2013 13:05:35 +0000 (06:05 -0700)]
Merge pull request #202 from notro/LoSSI

spi-bcm2708: add 9-bit support using LoSSI mode

12 years agoAdded Device IDs for August DVB-T 205
Franz Abzieher [Sun, 24 Mar 2013 10:44:37 +0000 (11:44 +0100)]
Added Device IDs for August DVB-T 205

12 years agodwc_otg: implement tasklet for returning URBs to usbcore hcd layer
P33M [Thu, 21 Mar 2013 19:36:17 +0000 (19:36 +0000)]
dwc_otg: implement tasklet for returning URBs to usbcore hcd layer

The dwc_otg driver interrupt handler for transfer completion will spend
a very long time with interrupts disabled when a URB is completed -
this is because usb_hcd_giveback_urb is called from within the handler
which for a USB device driver with complicated processing (e.g. webcam)
will take an exorbitant amount of time to complete. This results in
missed completion interrupts for other USB packets which lead to them
being dropped due to microframe overruns.

This patch splits returning the URB to the usb hcd layer into a
high-priority tasklet. This will have most benefit for isochronous IN
transfers but will also have incidental benefit where multiple periodic
devices are active at once.

12 years agoMerge pull request #249 from grimjoey/rpi-3.6.y
popcornmix [Mon, 18 Mar 2013 14:20:24 +0000 (07:20 -0700)]
Merge pull request #249 from grimjoey/rpi-3.6.y

Add device ID (330d)

12 years agoAdd device ID (330d)
Jo Are By [Sun, 17 Mar 2013 16:45:41 +0000 (17:45 +0100)]
Add device ID (330d)

12 years agoUSB: add OWL CM-160 support to cp210x driver
Luis Llorente Campo [Thu, 31 Jan 2013 12:37:05 +0000 (13:37 +0100)]
USB: add OWL CM-160 support to cp210x driver

This adds support for the OWL CM-160 electricity monitor to the cp210x
driver.

Signed-off-by: Luis Llorente <luisllorente@luisllorente.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations
Ivan Djelic [Wed, 6 Mar 2013 19:09:27 +0000 (20:09 +0100)]
ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations

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->magic = waiter;
INIT_LIST_HEAD(&waiter->list);
}

compiled as:

800554d0 <debug_mutex_lock_common>:
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 <memset>
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 -> r8, then
r0 -> 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 <64 bytes to go.
+       ldmeqfd sp!, {r8, pc}           @ Now <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 <ivan.djelic@parrot.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoMerge pull request #186 from mkj/rpi-3.6.y
popcornmix [Fri, 8 Mar 2013 16:21:44 +0000 (08:21 -0800)]
Merge pull request #186 from mkj/rpi-3.6.y

Add bitbanging pullups, use them for w1-gpio

12 years agoRun Lindent to fix whitespace, fix braces
Matt Johnston [Thu, 7 Mar 2013 10:56:49 +0000 (18:56 +0800)]
Run Lindent to fix whitespace, fix braces

12 years agoAdd bitbanging pullups, use them for w1-gpio
Matt Johnston [Fri, 7 Dec 2012 15:21:31 +0000 (23:21 +0800)]
Add bitbanging pullups, use them for w1-gpio

Allows parasite power to work, uses module option pullup=1

12 years agoUSB: usb-storage: unusual_devs update for Super TOP SATA bridge
Josh Boyer [Thu, 14 Feb 2013 14:39:09 +0000 (09:39 -0500)]
USB: usb-storage: unusual_devs update for Super TOP SATA bridge

The current entry in unusual_cypress.h for the Super TOP SATA bridge devices
seems to be causing corruption on newer revisions of this device.  This has
been reported in Arch Linux and Fedora.  The original patch was tested on
devices with bcdDevice of 1.60, whereas the newer devices report bcdDevice
as 2.20.  Limit the UNUSUAL_DEV entry to devices less than 2.20.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=909591

The Arch Forum post on this is here:
https://bbs.archlinux.org/viewtopic.php?id=152011

Reported-by: Carsten S. <carsteniq@yahoo.com>
Tested-by: Carsten S. <carsteniq@yahoo.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge pull request #242 from P33M/rpi-3.6.y
popcornmix [Wed, 6 Mar 2013 12:29:15 +0000 (04:29 -0800)]
Merge pull request #242 from P33M/rpi-3.6.y

dwc_otg: add handling of SPLIT transaction data toggle errors

12 years agoIncrease the minimum alsa buffer size as we get underrun with some apps (e.g. espeak)
popcornmix [Sun, 3 Mar 2013 21:35:30 +0000 (21:35 +0000)]
Increase the minimum alsa buffer size as we get underrun with some apps (e.g. espeak)

12 years agoUSB: option: add Telekom Speedstick LTE II
Bjørn Mork [Fri, 28 Dec 2012 16:29:52 +0000 (17:29 +0100)]
USB: option: add Telekom Speedstick LTE II

also known as Alcatel One Touch L100V LTE

The driver description files gives these names to the vendor specific
functions on this modem:

 Application1: VID_1BBB&PID_011E&MI_00
 Application2: VID_1BBB&PID_011E&MI_01
 Modem:        VID_1BBB&PID_011E&MI_03
 Ethernet:     VID_1BBB&PID_011E&MI_04

Reported-by: Thomas Schäfer <tschaefer@t-online.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodwc_otg: add handling of SPLIT transaction data toggle errors
P33M [Sun, 3 Mar 2013 14:45:53 +0000 (14:45 +0000)]
dwc_otg: add handling of SPLIT transaction data toggle errors

Previously a data toggle error on packets from a USB1.1 device behind
a TT would result in the Pi locking up as the driver never handled
the associated interrupt. Patch adds basic retry mechanism and
interrupt acknowledgement to cater for either a chance toggle error or
for devices that have a broken initial toggle state (FT8U232/FT232BM).