sch56xx-common.c (28ff2f7a742daba86ccd7021be7b27a4673b2797) sch56xx-common.c (0772a640793986d66fd3f89c3cc677bba5d5f94f)
1/***************************************************************************
2 * Copyright (C) 2010-2011 Hans de Goede <hdegoede@redhat.com> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *

--- 24 unchanged lines hidden (view full) ---

33#define SIO_LOCK_KEY 0xAA /* Key to disable Super-I/O */
34
35#define SIO_REG_LDSEL 0x07 /* Logical device select */
36#define SIO_REG_DEVID 0x20 /* Device ID */
37#define SIO_REG_ENABLE 0x30 /* Logical device enable */
38#define SIO_REG_ADDR 0x66 /* Logical device address (2 bytes) */
39
40#define SIO_SCH5627_ID 0xC6 /* Chipset ID */
1/***************************************************************************
2 * Copyright (C) 2010-2011 Hans de Goede <hdegoede@redhat.com> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *

--- 24 unchanged lines hidden (view full) ---

33#define SIO_LOCK_KEY 0xAA /* Key to disable Super-I/O */
34
35#define SIO_REG_LDSEL 0x07 /* Logical device select */
36#define SIO_REG_DEVID 0x20 /* Device ID */
37#define SIO_REG_ENABLE 0x30 /* Logical device enable */
38#define SIO_REG_ADDR 0x66 /* Logical device address (2 bytes) */
39
40#define SIO_SCH5627_ID 0xC6 /* Chipset ID */
41#define SIO_SCH5636_ID 0xC7 /* Chipset ID */
41
42#define REGION_LENGTH 9
43
44#define SCH56XX_CMD_READ 0x02
45#define SCH56XX_CMD_WRITE 0x03
46
47static struct platform_device *sch56xx_pdev;
48

--- 184 unchanged lines hidden (view full) ---

233 if (err)
234 return err;
235
236 devid = superio_inb(sioaddr, SIO_REG_DEVID);
237 switch (devid) {
238 case SIO_SCH5627_ID:
239 *name = "sch5627";
240 break;
42
43#define REGION_LENGTH 9
44
45#define SCH56XX_CMD_READ 0x02
46#define SCH56XX_CMD_WRITE 0x03
47
48static struct platform_device *sch56xx_pdev;
49

--- 184 unchanged lines hidden (view full) ---

234 if (err)
235 return err;
236
237 devid = superio_inb(sioaddr, SIO_REG_DEVID);
238 switch (devid) {
239 case SIO_SCH5627_ID:
240 *name = "sch5627";
241 break;
242 case SIO_SCH5636_ID:
243 *name = "sch5636";
244 break;
241 default:
242 pr_debug("Unsupported device id: 0x%02x\n",
243 (unsigned int)devid);
244 err = -ENODEV;
245 goto exit;
246 }
247
248 superio_select(sioaddr, SIO_SCH56XX_LD_EM);

--- 88 unchanged lines hidden ---
245 default:
246 pr_debug("Unsupported device id: 0x%02x\n",
247 (unsigned int)devid);
248 err = -ENODEV;
249 goto exit;
250 }
251
252 superio_select(sioaddr, SIO_SCH56XX_LD_EM);

--- 88 unchanged lines hidden ---