Date:2010-06-14 20:35:45 (13 years 9 months ago)
Author:nbd
Commit:f210f1fdc96ea21be1b5d5f3e7cfcfc1dc7adc65
Message:[backfire] backport the ssb dma device change from trunk

git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21802 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: target/linux/generic-2.6/patches-2.6.30/942-ssb_add_dma_dev.patch (1 diff)
target/linux/generic-2.6/patches-2.6.32/976-ssb_add_dma_dev.patch (1 diff)

Change Details

target/linux/generic-2.6/patches-2.6.30/942-ssb_add_dma_dev.patch
1--- a/drivers/ssb/main.c
2@@ -465,6 +465,7 @@ static int ssb_devices_register(struct s
3 #ifdef CONFIG_SSB_PCIHOST
4             sdev->irq = bus->host_pci->irq;
5             dev->parent = &bus->host_pci->dev;
6+ sdev->dma_dev = dev->parent;
7 #endif
8             break;
9         case SSB_BUSTYPE_PCMCIA:
10@@ -475,6 +476,7 @@ static int ssb_devices_register(struct s
11             break;
12         case SSB_BUSTYPE_SSB:
13             dev->dma_mask = &dev->coherent_dma_mask;
14+ sdev->dma_dev = dev;
15             break;
16         default:
17             break;
18--- a/include/linux/ssb/ssb.h
19@@ -167,7 +167,7 @@ struct ssb_device {
20      * is an optimization. */
21     const struct ssb_bus_ops *ops;
22
23- struct device *dev;
24+ struct device *dev, *dma_dev;
25
26     struct ssb_bus *bus;
27     struct ssb_device_id id;
target/linux/generic-2.6/patches-2.6.32/976-ssb_add_dma_dev.patch
1From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2
3Add dma_dev, a pointer to struct device, to struct ssb_device. We pass it
4to the generic DMA API with SSB_BUSTYPE_PCI and SSB_BUSTYPE_SSB.
5ssb_devices_register() sets up it properly.
6
7This is preparation for replacing the ssb bus specific DMA API (ssb_dma_*)
8with the generic DMA API.
9
10Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
11Acked-by: Michael Buesch <mb@bu3sch.de>
12Cc: Gary Zambrano <zambrano@broadcom.com>
13Cc: Stefano Brivio <stefano.brivio@polimi.it>
14Cc: Larry Finger <Larry.Finger@lwfinger.net>
15Cc: John W. Linville <linville@tuxdriver.com>
16Acked-by: David S. Miller <davem@davemloft.net>
17Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
18---
19
20 drivers/ssb/main.c | 2 ++
21 include/linux/ssb/ssb.h | 2 +-
22 2 files changed, 3 insertions(+), 1 deletion(-)
23
24--- a/drivers/ssb/main.c
25@@ -486,6 +486,7 @@ static int ssb_devices_register(struct s
26 #ifdef CONFIG_SSB_PCIHOST
27             sdev->irq = bus->host_pci->irq;
28             dev->parent = &bus->host_pci->dev;
29+ sdev->dma_dev = dev->parent;
30 #endif
31             break;
32         case SSB_BUSTYPE_PCMCIA:
33@@ -501,6 +502,7 @@ static int ssb_devices_register(struct s
34             break;
35         case SSB_BUSTYPE_SSB:
36             dev->dma_mask = &dev->coherent_dma_mask;
37+ sdev->dma_dev = dev;
38             break;
39         }
40
41--- a/include/linux/ssb/ssb.h
42@@ -167,7 +167,7 @@ struct ssb_device {
43      * is an optimization. */
44     const struct ssb_bus_ops *ops;
45
46- struct device *dev;
47+ struct device *dev, *dma_dev;
48
49     struct ssb_bus *bus;
50     struct ssb_device_id id;

Archive Download the corresponding diff file



interactive