diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-04 04:12:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-04 04:12:50 -0400 |
commit | bdd32ce95f79fb5cc964cd789d7ae4500bba7c6f (patch) | |
tree | 506a7deeb0e91f8ed8b582a0596303a804a8d779 /drivers/video/sunxvr500.c | |
parent | 954fbc8985328a3b59b5881243d3aa04a8f8da7c (diff) |
sunxvr500: Ignore secondary output PCI devices.
These just represent the secondary and further heads attached to the
card, and they have different sets of PCI bar registers to map.
So don't try to drive them in the main driver.
Reported-by: Frans van Berckel <fberckel@xs4all.nl>
Tested-by: Frans van Berckel <fberckel@xs4all.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/video/sunxvr500.c')
-rw-r--r-- | drivers/video/sunxvr500.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/video/sunxvr500.c b/drivers/video/sunxvr500.c index 4cd50497264d..3803745d6eee 100644 --- a/drivers/video/sunxvr500.c +++ b/drivers/video/sunxvr500.c | |||
@@ -242,11 +242,27 @@ static int __devinit e3d_set_fbinfo(struct e3d_info *ep) | |||
242 | static int __devinit e3d_pci_register(struct pci_dev *pdev, | 242 | static int __devinit e3d_pci_register(struct pci_dev *pdev, |
243 | const struct pci_device_id *ent) | 243 | const struct pci_device_id *ent) |
244 | { | 244 | { |
245 | struct device_node *of_node; | ||
246 | const char *device_type; | ||
245 | struct fb_info *info; | 247 | struct fb_info *info; |
246 | struct e3d_info *ep; | 248 | struct e3d_info *ep; |
247 | unsigned int line_length; | 249 | unsigned int line_length; |
248 | int err; | 250 | int err; |
249 | 251 | ||
252 | of_node = pci_device_to_OF_node(pdev); | ||
253 | if (!of_node) { | ||
254 | printk(KERN_ERR "e3d: Cannot find OF node of %s\n", | ||
255 | pci_name(pdev)); | ||
256 | return -ENODEV; | ||
257 | } | ||
258 | |||
259 | device_type = of_get_property(of_node, "device_type", NULL); | ||
260 | if (!device_type) { | ||
261 | printk(KERN_INFO "e3d: Ignoring secondary output device " | ||
262 | "at %s\n", pci_name(pdev)); | ||
263 | return -ENODEV; | ||
264 | } | ||
265 | |||
250 | err = pci_enable_device(pdev); | 266 | err = pci_enable_device(pdev); |
251 | if (err < 0) { | 267 | if (err < 0) { |
252 | printk(KERN_ERR "e3d: Cannot enable PCI device %s\n", | 268 | printk(KERN_ERR "e3d: Cannot enable PCI device %s\n", |
@@ -265,13 +281,7 @@ static int __devinit e3d_pci_register(struct pci_dev *pdev, | |||
265 | ep->info = info; | 281 | ep->info = info; |
266 | ep->pdev = pdev; | 282 | ep->pdev = pdev; |
267 | spin_lock_init(&ep->lock); | 283 | spin_lock_init(&ep->lock); |
268 | ep->of_node = pci_device_to_OF_node(pdev); | 284 | ep->of_node = of_node; |
269 | if (!ep->of_node) { | ||
270 | printk(KERN_ERR "e3d: Cannot find OF node of %s\n", | ||
271 | pci_name(pdev)); | ||
272 | err = -ENODEV; | ||
273 | goto err_release_fb; | ||
274 | } | ||
275 | 285 | ||
276 | /* Read the PCI base register of the frame buffer, which we | 286 | /* Read the PCI base register of the frame buffer, which we |
277 | * need in order to interpret the RAMDAC_VID_*FB* values in | 287 | * need in order to interpret the RAMDAC_VID_*FB* values in |