twsi.c (256281) | twsi.c (266152) |
---|---|
1/*- 2 * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. 3 * All rights reserved. 4 * 5 * Developed by Semihalf. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 24 unchanged lines hidden (view full) --- 33 * Driver for the TWSI (aka I2C, aka IIC) bus controller found on Marvell 34 * SoCs. Supports master operation only, and works in polling mode. 35 * 36 * Calls to DELAY() are needed per Application Note AN-179 "TWSI Software 37 * Guidelines for Discovery(TM), Horizon (TM) and Feroceon(TM) Devices". 38 */ 39 40#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. 3 * All rights reserved. 4 * 5 * Developed by Semihalf. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 24 unchanged lines hidden (view full) --- 33 * Driver for the TWSI (aka I2C, aka IIC) bus controller found on Marvell 34 * SoCs. Supports master operation only, and works in polling mode. 35 * 36 * Calls to DELAY() are needed per Application Note AN-179 "TWSI Software 37 * Guidelines for Discovery(TM), Horizon (TM) and Feroceon(TM) Devices". 38 */ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: stable/10/sys/arm/mv/twsi.c 239508 2012-08-21 17:49:20Z hrs $"); | 41__FBSDID("$FreeBSD: stable/10/sys/arm/mv/twsi.c 266152 2014-05-15 16:11:06Z ian $"); |
42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/bus.h> 46#include <sys/kernel.h> 47#include <sys/module.h> 48#include <sys/resource.h> 49 --- 250 unchanged lines hidden (view full) --- 300 301 return (IIC_NOERR); 302} 303 304static int 305mv_twsi_probe(device_t dev) 306{ 307 | 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/bus.h> 46#include <sys/kernel.h> 47#include <sys/module.h> 48#include <sys/resource.h> 49 --- 250 unchanged lines hidden (view full) --- 300 301 return (IIC_NOERR); 302} 303 304static int 305mv_twsi_probe(device_t dev) 306{ 307 |
308 if (!ofw_bus_status_okay(dev)) 309 return (ENXIO); 310 |
|
308 if (!ofw_bus_is_compatible(dev, "mrvl,twsi")) 309 return (ENXIO); 310 311 device_set_desc(dev, "Marvell Integrated I2C Bus Controller"); 312 return (BUS_PROBE_DEFAULT); 313} 314 315#define ABSSUB(a,b) (((a) > (b)) ? (a) - (b) : (b) - (a)) --- 323 unchanged lines hidden --- | 311 if (!ofw_bus_is_compatible(dev, "mrvl,twsi")) 312 return (ENXIO); 313 314 device_set_desc(dev, "Marvell Integrated I2C Bus Controller"); 315 return (BUS_PROBE_DEFAULT); 316} 317 318#define ABSSUB(a,b) (((a) > (b)) ? (a) - (b) : (b) - (a)) --- 323 unchanged lines hidden --- |