diff options
author | Daniel Drake <dsd@laptop.org> | 2010-09-21 11:37:26 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-11-09 11:38:09 -0500 |
commit | b884a94ed16d1a633e76f80fb1bd75d0e7373ce3 (patch) | |
tree | 373074010cf11e19086d1b4b9a5e5d335cae667b /drivers | |
parent | 67eb6f9617a24dfb033b584d6b1b42b39cc9297a (diff) |
viafb: Add OLPC XO-1.5 port configs
The OLPC XO-1.5 does not use the standard port wiring suggested
in the viafb driver.
This is required for the upcoming OLPC DCON and via-camera drivers,
to be submitted soon.
Signed-off-by: Daniel Drake <dsd@laptop.org>
[fts: removed useless ifdef's and corrected comment]
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/via/via-core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/video/via/via-core.c b/drivers/video/via/via-core.c index 42be3d955887..86bd7197f366 100644 --- a/drivers/video/via/via-core.c +++ b/drivers/video/via/via-core.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
20 | #include <asm/olpc.h> | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * The default port config. | 23 | * The default port config. |
@@ -31,6 +32,19 @@ static struct via_port_cfg adap_configs[] = { | |||
31 | }; | 32 | }; |
32 | 33 | ||
33 | /* | 34 | /* |
35 | * The OLPC XO-1.5 puts the camera power and reset lines onto | ||
36 | * GPIO 2C. | ||
37 | */ | ||
38 | static const struct via_port_cfg olpc_adap_configs[] = { | ||
39 | [VIA_PORT_26] = { VIA_PORT_I2C, VIA_MODE_I2C, VIASR, 0x26 }, | ||
40 | [VIA_PORT_31] = { VIA_PORT_I2C, VIA_MODE_I2C, VIASR, 0x31 }, | ||
41 | [VIA_PORT_25] = { VIA_PORT_GPIO, VIA_MODE_GPIO, VIASR, 0x25 }, | ||
42 | [VIA_PORT_2C] = { VIA_PORT_GPIO, VIA_MODE_GPIO, VIASR, 0x2c }, | ||
43 | [VIA_PORT_3D] = { VIA_PORT_GPIO, VIA_MODE_GPIO, VIASR, 0x3d }, | ||
44 | { 0, 0, 0, 0 } | ||
45 | }; | ||
46 | |||
47 | /* | ||
34 | * We currently only support one viafb device (will there ever be | 48 | * We currently only support one viafb device (will there ever be |
35 | * more than one?), so just declare it globally here. | 49 | * more than one?), so just declare it globally here. |
36 | */ | 50 | */ |
@@ -654,6 +668,9 @@ static int __devinit via_pci_probe(struct pci_dev *pdev, | |||
654 | global_dev.pdev = pdev; | 668 | global_dev.pdev = pdev; |
655 | global_dev.chip_type = ent->driver_data; | 669 | global_dev.chip_type = ent->driver_data; |
656 | global_dev.port_cfg = adap_configs; | 670 | global_dev.port_cfg = adap_configs; |
671 | if (machine_is_olpc()) | ||
672 | global_dev.port_cfg = olpc_adap_configs; | ||
673 | |||
657 | spin_lock_init(&global_dev.reg_lock); | 674 | spin_lock_init(&global_dev.reg_lock); |
658 | ret = via_pci_setup_mmio(&global_dev); | 675 | ret = via_pci_setup_mmio(&global_dev); |
659 | if (ret) | 676 | if (ret) |