Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225607
b: refs/heads/master
c: b884a94
h: refs/heads/master
i:
  225605: 115d98d
  225603: 67bf2f8
  225599: 86bcb53
v: v3
  • Loading branch information
Daniel Drake authored and Florian Tobias Schandinat committed Nov 9, 2010
1 parent 2c9eee6 commit 27cd37b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67eb6f9617a24dfb033b584d6b1b42b39cc9297a
refs/heads/master: b884a94ed16d1a633e76f80fb1bd75d0e7373ce3
17 changes: 17 additions & 0 deletions trunk/drivers/video/via/via-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/platform_device.h>
#include <linux/list.h>
#include <linux/pm.h>
#include <asm/olpc.h>

/*
* The default port config.
Expand All @@ -30,6 +31,19 @@ static struct via_port_cfg adap_configs[] = {
{ 0, 0, 0, 0 }
};

/*
* The OLPC XO-1.5 puts the camera power and reset lines onto
* GPIO 2C.
*/
static const struct via_port_cfg olpc_adap_configs[] = {
[VIA_PORT_26] = { VIA_PORT_I2C, VIA_MODE_I2C, VIASR, 0x26 },
[VIA_PORT_31] = { VIA_PORT_I2C, VIA_MODE_I2C, VIASR, 0x31 },
[VIA_PORT_25] = { VIA_PORT_GPIO, VIA_MODE_GPIO, VIASR, 0x25 },
[VIA_PORT_2C] = { VIA_PORT_GPIO, VIA_MODE_GPIO, VIASR, 0x2c },
[VIA_PORT_3D] = { VIA_PORT_GPIO, VIA_MODE_GPIO, VIASR, 0x3d },
{ 0, 0, 0, 0 }
};

/*
* We currently only support one viafb device (will there ever be
* more than one?), so just declare it globally here.
Expand Down Expand Up @@ -654,6 +668,9 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
global_dev.pdev = pdev;
global_dev.chip_type = ent->driver_data;
global_dev.port_cfg = adap_configs;
if (machine_is_olpc())
global_dev.port_cfg = olpc_adap_configs;

spin_lock_init(&global_dev.reg_lock);
ret = via_pci_setup_mmio(&global_dev);
if (ret)
Expand Down

0 comments on commit 27cd37b

Please sign in to comment.