pnp: Allow setting of misc register 0xf4 in device tree

Change-Id: I602f970e0ee2fd634a74fd4c25358c2e78ca58f9
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/179536
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
(cherry picked from commit 02b0583e632f1ba53557f8cfe4293ad4ed29ff4d)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6910
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Stefan Reinauer 2013-12-11 11:06:08 -08:00 committed by Isaac Christensen
parent a799151534
commit 0108b936bf
4 changed files with 10 additions and 2 deletions

View File

@ -300,6 +300,11 @@ static void get_resources(device_t dev, struct pnp_info *info)
resource->size = 1; resource->size = 1;
resource->flags |= IORESOURCE_IRQ; resource->flags |= IORESOURCE_IRQ;
} }
if (info->flags & PNP_MSC4) {
resource = new_resource(dev, PNP_IDX_MSC4);
resource->size = 1;
resource->flags |= IORESOURCE_IRQ;
}
if (info->flags & PNP_MSC10) { if (info->flags & PNP_MSC10) {
resource = new_resource(dev, PNP_IDX_MSC10); resource = new_resource(dev, PNP_IDX_MSC10);
resource->size = 1; resource->size = 1;

View File

@ -48,7 +48,8 @@ struct pnp_info {
#define PNP_EN 0x100 #define PNP_EN 0x100
#define PNP_MSC0 0x200 #define PNP_MSC0 0x200
#define PNP_MSC1 0x400 #define PNP_MSC1 0x400
#define PNP_MSC10 0x800 #define PNP_MSC4 0x800
#define PNP_MSC10 0x1000
struct io_info io0, io1, io2, io3; struct io_info io0, io1, io2, io3;
}; };
struct resource *pnp_get_resource(device_t dev, unsigned index); struct resource *pnp_get_resource(device_t dev, unsigned index);

View File

@ -12,6 +12,7 @@
#define PNP_IDX_DRQ1 0x75 #define PNP_IDX_DRQ1 0x75
#define PNP_IDX_MSC0 0xf0 #define PNP_IDX_MSC0 0xf0
#define PNP_IDX_MSC1 0xf1 #define PNP_IDX_MSC1 0xf1
#define PNP_IDX_MSC4 0xf4
#define PNP_IDX_MSC10 0xfa #define PNP_IDX_MSC10 0xfa
#endif /* DEVICE_PNP_DEF_H */ #endif /* DEVICE_PNP_DEF_H */

View File

@ -207,7 +207,8 @@ static struct pnp_info pnp_dev_info[] = {
/* Serial Port 1 */ /* Serial Port 1 */
{ &ops, IT8772F_SP1, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, }, { &ops, IT8772F_SP1, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
/* Environmental Controller */ /* Environmental Controller */
{ &ops, IT8772F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_MSC10, { &ops, IT8772F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 |
PNP_MSC4 | PNP_MSC10,
{0x0ff8, 0}, {0x0ffc, 4}, }, {0x0ff8, 0}, {0x0ffc, 4}, },
/* KBC Keyboard */ /* KBC Keyboard */
{ &ops, IT8772F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, { &ops, IT8772F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0,