Update mvs(4) driver to work over FDT's simplebus(4) bus.

This commit is contained in:
Alexander Motin 2011-03-28 11:08:58 +00:00
parent 3c14a0e3fb
commit 01e2aa9f81

View File

@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
#include <arm/mv/mvreg.h>
#include <arm/mv/mvvar.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
#include "mvs.h"
/* local prototypes */
@ -73,6 +75,9 @@ mvs_probe(device_t dev)
int i;
uint32_t devid, revid;
if (!ofw_bus_is_compatible(dev, "mrvl,sata"))
return (ENXIO);
soc_id(&devid, &revid);
for (i = 0; mvs_ids[i].id != 0; i++) {
if (mvs_ids[i].id == devid &&
@ -440,10 +445,10 @@ static device_method_t mvs_methods[] = {
{ 0, 0 }
};
static driver_t mvs_driver = {
"sata",
"mvs",
mvs_methods,
sizeof(struct mvs_controller)
};
DRIVER_MODULE(sata, mbus, mvs_driver, mvs_devclass, 0, 0);
MODULE_VERSION(sata, 1);
DRIVER_MODULE(mvs, simplebus, mvs_driver, mvs_devclass, 0, 0);
MODULE_VERSION(mvs, 1);
MODULE_DEPEND(mvs, cam, 1, 1, 1);