Date: Tue, 27 Mar 2012 11:17:04 +0000 (UTC) From: "Jayachandran C." <jchandra@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r233540 - in head/sys/mips: conf nlm Message-ID: <201203271117.q2RBH4Ur083470@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jchandra Date: Tue Mar 27 11:17:04 2012 New Revision: 233540 URL: http://svn.freebsd.org/changeset/base/233540 Log: I2C support for XLP, add hints for I2C devices and update PCI resource allocation code. Added: head/sys/mips/conf/XLP.hints (contents, props changed) Modified: head/sys/mips/conf/std.XLP head/sys/mips/nlm/xlp_pci.c Added: head/sys/mips/conf/XLP.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/XLP.hints Tue Mar 27 11:17:04 2012 (r233540) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +# RTC +hint.ds1374_rtc.0.at="iicbus1" +hint.ds1374_rtc.0.addr=0xd0 Modified: head/sys/mips/conf/std.XLP ============================================================================== --- head/sys/mips/conf/std.XLP Tue Mar 27 10:44:32 2012 (r233539) +++ head/sys/mips/conf/std.XLP Tue Mar 27 11:17:04 2012 (r233540) @@ -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 #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 Modified: head/sys/mips/nlm/xlp_pci.c ============================================================================== --- head/sys/mips/nlm/xlp_pci.c Tue Mar 27 10:44:32 2012 (r233539) +++ head/sys/mips/nlm/xlp_pci.c Tue Mar 27 11:17:04 2012 (r233540) @@ -497,6 +497,15 @@ assign_soc_resource(device_t child, int *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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203271117.q2RBH4Ur083470>