I2C support for XLP, add hints for I2C devices and update PCI resource
allocation code.
This commit is contained in:
parent
1ab68cbb08
commit
8f57f9e0d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233540
5
sys/mips/conf/XLP.hints
Normal file
5
sys/mips/conf/XLP.hints
Normal file
@ -0,0 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# RTC
|
||||
hint.ds1374_rtc.0.at="iicbus1"
|
||||
hint.ds1374_rtc.0.addr=0xd0
|
@ -5,6 +5,8 @@ makeoptions MODULES_OVERRIDE=""
|
||||
makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
|
||||
#profile 2
|
||||
|
||||
hints "XLP.hints"
|
||||
|
||||
options SCHED_ULE # ULE scheduler
|
||||
#options VERBOSE_SYSINIT
|
||||
#options SCHED_4BSD # 4BSD scheduler
|
||||
@ -55,6 +57,11 @@ options ALT_BREAK_TO_DEBUGGER
|
||||
|
||||
options GEOM_UZIP
|
||||
|
||||
# Device tree
|
||||
options FDT
|
||||
options FDT_DTB_STATIC
|
||||
makeoptions FDT_DTS_FILE=xlp-basic.dts
|
||||
|
||||
# Pseudo
|
||||
device loop
|
||||
device random
|
||||
@ -83,6 +90,8 @@ device ehci # EHCI PCI->USB interface (USB 2.0)
|
||||
#device uhid # "Human Interface Devices"
|
||||
device umass # Requires scbus and da
|
||||
|
||||
options FDT
|
||||
options FDT_DTB_STATIC
|
||||
makeoptions FDT_DTS_FILE=xlp-basic.dts
|
||||
# i2c driver and devices
|
||||
device iic
|
||||
device iicbus
|
||||
device iicoc
|
||||
device ds1374 # RTC on XLP boards
|
||||
|
@ -497,6 +497,15 @@ assign_soc_resource(device_t child, int type, u_long *startp, u_long *endp,
|
||||
*rm = &emul_rman;
|
||||
*bst = uart_bus_space_mem;
|
||||
break;
|
||||
|
||||
case PCI_DEVICE_ID_NLM_I2C:
|
||||
*va = nlm_pcicfg_base(XLP_IO_I2C_OFFSET(node, unit)) +
|
||||
XLP_IO_PCI_HDRSZ;
|
||||
*startp = MIPS_KSEG1_TO_PHYS(*va);
|
||||
*countp = 0x100;
|
||||
*rm = &emul_rman;
|
||||
*bst = uart_bus_space_mem;
|
||||
break;
|
||||
}
|
||||
/* calculate end if allocated */
|
||||
if (*rm)
|
||||
|
Loading…
Reference in New Issue
Block a user