mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
ig4(4): Add an EMAG device type
Sponsored by: Ampere Computing LLC, Netflix Submitted by: allanjude Differential Revision: https://reviews.freebsd.org/D28746 Reviewed by: imp
This commit is contained in:
parent
500bf0592c
commit
5972ffde91
|
@ -83,13 +83,21 @@ static int
|
|||
ig4iic_acpi_attach(device_t dev)
|
||||
{
|
||||
ig4iic_softc_t *sc;
|
||||
char *str;
|
||||
int error;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
|
||||
sc->dev = dev;
|
||||
/* All the HIDs matched are Atom SOCs. */
|
||||
sc->version = IG4_ATOM;
|
||||
error = ACPI_ID_PROBE(device_get_parent(dev), dev, ig4iic_ids, &str);
|
||||
if (error > 0)
|
||||
return (error);
|
||||
if (strcmp(str, "APMC0D0F") == 0) {
|
||||
sc->version = IG4_EMAG;
|
||||
} else {
|
||||
/* All the other HIDs matched are Atom SOCs. */
|
||||
sc->version = IG4_ATOM;
|
||||
}
|
||||
sc->regs_rid = 0;
|
||||
sc->regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
|
||||
&sc->regs_rid, RF_ACTIVE);
|
||||
|
|
|
@ -89,6 +89,9 @@
|
|||
* Ig4 hardware parameters except Haswell are taken from intel_lpss driver
|
||||
*/
|
||||
static const struct ig4_hw ig4iic_hw[] = {
|
||||
[IG4_EMAG] = {
|
||||
.ic_clock_rate = 100, /* MHz */
|
||||
},
|
||||
[IG4_HASWELL] = {
|
||||
.ic_clock_rate = 100, /* MHz */
|
||||
.sda_hold_time = 90, /* nsec */
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "iicbus_if.h"
|
||||
|
||||
enum ig4_vers {
|
||||
IG4_EMAG,
|
||||
IG4_HASWELL,
|
||||
IG4_ATOM,
|
||||
IG4_SKYLAKE,
|
||||
|
|
Loading…
Reference in a new issue