mb/google/skyrim: Enable ACPI tables
[coreboot.git] / util / autoport / rce823.go
blob7c921093f4ae1061fc477391a9d5c914f7c0c2af
1 package main
3 import "fmt"
5 type rce823 struct {
6 variant string
9 func (r rce823) Scan(ctx Context, addr PCIDevData) {
10 if addr.Dev == 0 && addr.Func == 0 {
11 cur := DevTreeNode{
12 Chip: "drivers/ricoh/rce822",
13 Comment: "Ricoh cardreader",
14 Registers: map[string]string{
16 "sdwppol": fmt.Sprintf("%d", (addr.ConfigDump[0xfb]&2)>>1),
17 "disable_mask": fmt.Sprintf("0x%x", addr.ConfigDump[0xcb]),
19 PCISlots: []PCISlot{
20 PCISlot{PCIAddr: PCIAddr{Bus: addr.Bus, Dev: 0x0, Func: 0}, writeEmpty: false},
21 PCISlot{PCIAddr: PCIAddr{Bus: addr.Bus, Dev: 0x0, Func: 1}, writeEmpty: false},
22 PCISlot{PCIAddr: PCIAddr{Bus: addr.Bus, Dev: 0x0, Func: 2}, writeEmpty: false},
23 PCISlot{PCIAddr: PCIAddr{Bus: addr.Bus, Dev: 0x0, Func: 3}, writeEmpty: false},
24 PCISlot{PCIAddr: PCIAddr{Bus: addr.Bus, Dev: 0x0, Func: 4}, writeEmpty: false},
25 PCISlot{PCIAddr: PCIAddr{Bus: addr.Bus, Dev: 0x0, Func: 5}, writeEmpty: false},
26 PCISlot{PCIAddr: PCIAddr{Bus: addr.Bus, Dev: 0x0, Func: 6}, writeEmpty: false},
27 PCISlot{PCIAddr: PCIAddr{Bus: addr.Bus, Dev: 0x0, Func: 7}, writeEmpty: false},
30 PutPCIChip(addr, cur)
32 PutPCIDev(addr, "Ricoh SD card reader")
33 KconfigBool["DRIVERS_RICOH_RCE822"] = true
36 func init() {
37 RegisterPCI(0x1180, 0xe822, rce823{})
38 RegisterPCI(0x1180, 0xe823, rce823{})