Commit Graph

10 Commits

Author SHA1 Message Date
Emmanuel Vadot
8ca9ff4f28 mips: Fix build by using the correct device-tree include path 2021-01-16 11:34:10 +01:00
Mateusz Guzik
f1ffd05af1 mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
Adrian Chadd
5d3ae74635 [mediatek] [gpio] add PPS / interrupt support.
Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	mizhka
Differential Revision:	https://reviews.freebsd.org/D9784
2017-05-06 06:22:14 +00:00
Andrew Turner
9346e9130d Return the struct intr_pic pointer from intr_pic_register. This will be
needed in later changes where we may not be able to lock the pic list lock
to perform a lookup, e.g. from within interrupt context.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-18 15:05:44 +00:00
Stanislav Galabov
025f79a5cd mtk_gpio fixes
Allow output pins to be read and input pins to be set.
Fix bugs where we were trying to access the gpio softc before doing
device_get_softc.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D6222
2016-05-06 05:22:25 +00:00
Svatopluk Kraus
cd642c88a1 INTRNG - redefine struct intr_map_data to avoid headers pollution. Each
struct associated with some type defined in enum intr_map_data_type
must have struct intr_map_data on the top of its own definition now.
When such structs are used, correct type and size must be filled in.

There are three such structs defined in sys/intr.h now. Their
definitions should be moved to corresponding headers by follow-up
commits.

While this change was propagated to all INTRNG like PICs,
pic_map_intr() method implementations were corrected on some places.
For this specific method, it's ensured by a caller that the 'data'
argument passed to this method is never NULL. Also, the return error
values were standardized there.
2016-05-05 13:31:19 +00:00
Stanislav Galabov
680354a7a4 Rework mtk_gpio_v1 driver
This revision makes the mtk_gpio_v1 driver read its register map property
from the OpenWRT dts files.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D6029
2016-04-20 14:36:45 +00:00
Stanislav Galabov
c1300b5e37 Mediatek/Ralink: Get our drivers closer to OpenWRT dts definitions
This revision gets our Mediatek/Ralink drivers closer to OpenWRT's dts
definitions, so we can reuse them with less modifications later in order
to bring support for a lot of boards at once.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5961
2016-04-15 15:24:42 +00:00
Stanislav Galabov
33311df141 Introduce better locking for mtk_gpio_v[12] drivers
Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5887
2016-04-08 15:28:12 +00:00
Stanislav Galabov
ab68acd8c0 Initial import of Ralink/Mediatek MIPS SoC support #7
GPIO controller drivers import.

As with other Ralink/Mediatek work, there are 2 versions of the GPIO
controller driver, depending on the type of SoC.
This revision introduces initial support for these.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5877
2016-04-07 15:11:24 +00:00