diff options
author | ian <ian@FreeBSD.org> | 2014-05-16 12:43:45 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-16 12:43:45 +0000 |
commit | c5659dcd16ed886ea681d541edb63efd092e73ff (patch) | |
tree | 5d4a3b61529fef1a1f99812ebf20f9c2606a3cd7 /sys/dev/nand/nfc_at91.c | |
parent | 4542382f0af627dd927f809527375182cf260123 (diff) | |
download | FreeBSD-src-c5659dcd16ed886ea681d541edb63efd092e73ff.zip FreeBSD-src-c5659dcd16ed886ea681d541edb63efd092e73ff.tar.gz |
MFC r262591, r262592, r262593, r262597, r262598, r262599, r262600, r262601,
r262606
Initial import of Linux/Vendor DTS files for various embedded boards.
Initial import of DTS files from Linux
Correct initial import script
New AT91 devices or fdt probe added to existing devices. Some of these
are just stubs for testing the new dts.
- nand
- SDRAMC
- shdwc
- tcb
- usb host and gadget
Diffstat (limited to 'sys/dev/nand/nfc_at91.c')
-rw-r--r-- | sys/dev/nand/nfc_at91.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/dev/nand/nfc_at91.c b/sys/dev/nand/nfc_at91.c index 7357cdb..74b0901 100644 --- a/sys/dev/nand/nfc_at91.c +++ b/sys/dev/nand/nfc_at91.c @@ -32,6 +32,8 @@ * is on the board. */ +#include "opt_platform.h" + #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -57,6 +59,12 @@ __FBSDID("$FreeBSD$"); #include <dev/nand/nfc_at91.h> #include <arm/at91/at91_smc.h> +#ifdef FDT +#include <dev/fdt/fdt_common.h> +#include <dev/ofw/ofw_bus.h> +#include <dev/ofw/ofw_bus_subr.h> +#endif + /* * Data cycles are triggered by access to any address within the EBI CS3 region * that has A21 and A22 clear. Command cycles are any access with bit A21 @@ -108,7 +116,10 @@ dev_write_1(struct at91_nand_softc *sc, bus_size_t offset, u_int8_t value) static int at91_nand_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-nand")) + return (ENXIO); +#endif device_set_desc(dev, "AT91 Integrated NAND controller"); return (BUS_PROBE_DEFAULT); } @@ -274,5 +285,9 @@ static driver_t at91_nand_driver = { }; static devclass_t at91_nand_devclass; -DRIVER_MODULE(at91_nand, atmelarm, at91_nand_driver, at91_nand_devclass, 0, 0); +#ifdef FDT +DRIVER_MODULE(at91_nand, simplebus, at91_nand_driver, at91_nand_devclass, 0, 0); +#else +DRIVER_MODULE(at91_nand, atmelarm, at91_nand_driver, at91_nand_devclass, 0, 0); +#endif |