diff options
author | gonzo <gonzo@FreeBSD.org> | 2015-05-22 03:16:18 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2015-05-22 03:16:18 +0000 |
commit | ef6ca4337dbbc940f520cf42fcbaa689ee676850 (patch) | |
tree | 23662d9a59f877c1e1e89abf4736479e17c8ecff /sys/arm/ti/ti_edma3.c | |
parent | 721376a5c9d5d2b8efdd1a396039113b3030ba73 (diff) | |
download | FreeBSD-src-ef6ca4337dbbc940f520cf42fcbaa689ee676850.zip FreeBSD-src-ef6ca4337dbbc940f520cf42fcbaa689ee676850.tar.gz |
Switch TI platform support code from using FreeBSD's custom-baked DTS
files to vendor-provided ones. It should make easier to adopt platform
code to new revisions of hardware and to use DTS overlays for various
Beaglebone extensions (shields/capes).
Original dts filenames were not changed, they're now wrappers over dts
files provided by TI. So make sure you update .dtb files on your
devices as part of kernel update
GPIO addressing was changed: instead of one global /dev/gpioc0 there
are per-bank instances of /dev/gpiocX. Each bank has 32 pins so for
instance pin 121 on /dev/gpioc0 in old addressing scheme is now pin 25
on /dev/gpioc3
On Pandaboard serial console devices was changed from /dev/ttyu0 to
/dev/ttyu2 so you'll have to update /etc/ttys to get login prompt
on serial port in multiuser mode. Single user mode serial console
should work as-is
Differential Revision: https://reviews.freebsd.org/D2146
Reviewed by: rpaulo, ian, Michal Meloun, Svatopluk Kraus
Diffstat (limited to 'sys/arm/ti/ti_edma3.c')
-rw-r--r-- | sys/arm/ti/ti_edma3.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/arm/ti/ti_edma3.c b/sys/arm/ti/ti_edma3.c index 1489ff7..080e7bd 100644 --- a/sys/arm/ti/ti_edma3.c +++ b/sys/arm/ti/ti_edma3.c @@ -99,7 +99,11 @@ __FBSDID("$FreeBSD$"); struct ti_edma3_softc { device_t sc_dev; - struct resource * mem_res[TI_EDMA3_NUM_TCS+1]; + /* + * We use one-element array in case if we need to add + * mem resources for transfer control windows + */ + struct resource * mem_res[1]; struct resource * irq_res[TI_EDMA3_NUM_IRQS]; void *ih_cookie[TI_EDMA3_NUM_IRQS]; }; @@ -108,9 +112,6 @@ static struct ti_edma3_softc *ti_edma3_sc = NULL; static struct resource_spec ti_edma3_mem_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, - { SYS_RES_MEMORY, 1, RF_ACTIVE }, - { SYS_RES_MEMORY, 2, RF_ACTIVE }, - { SYS_RES_MEMORY, 3, RF_ACTIVE }, { -1, 0, 0 } }; static struct resource_spec ti_edma3_irq_spec[] = { @@ -123,8 +124,6 @@ static struct resource_spec ti_edma3_irq_spec[] = { /* Read/Write macros */ #define ti_edma3_cc_rd_4(reg) bus_read_4(ti_edma3_sc->mem_res[0], reg) #define ti_edma3_cc_wr_4(reg, val) bus_write_4(ti_edma3_sc->mem_res[0], reg, val) -#define ti_edma3_tc_rd_4(c, reg) bus_read_4(ti_edma3_sc->mem_res[c+1], reg) -#define ti_edma3_tc_wr_4(c, reg, val) bus_write_4(ti_edma3_sc->mem_res[c+1], reg, val) static void ti_edma3_intr_comp(void *arg); static void ti_edma3_intr_mperr(void *arg); |