Deleted Added
full compact
rk30xx_pmu.c (259329) rk30xx_pmu.c (266152)
1/*-
2 * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27/* PMU for Rockchip RK30xx */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27/* PMU for Rockchip RK30xx */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: stable/10/sys/arm/rockchip/rk30xx_pmu.c 259329 2013-12-13 20:43:11Z ian $");
30__FBSDID("$FreeBSD: stable/10/sys/arm/rockchip/rk30xx_pmu.c 266152 2014-05-15 16:11:06Z ian $");
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/bus.h>
35#include <sys/kernel.h>
36#include <sys/module.h>
37#include <sys/malloc.h>
38#include <sys/rman.h>

--- 26 unchanged lines hidden (view full) ---

65 bus_space_read_4((sc)->bst, (sc)->bsh, (reg))
66#define pmu_write_4(sc, reg, val) \
67 bus_space_write_4((sc)->bst, (sc)->bsh, (reg), (val))
68
69static int
70rk30_pmu_probe(device_t dev)
71{
72
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/bus.h>
35#include <sys/kernel.h>
36#include <sys/module.h>
37#include <sys/malloc.h>
38#include <sys/rman.h>

--- 26 unchanged lines hidden (view full) ---

65 bus_space_read_4((sc)->bst, (sc)->bsh, (reg))
66#define pmu_write_4(sc, reg, val) \
67 bus_space_write_4((sc)->bst, (sc)->bsh, (reg), (val))
68
69static int
70rk30_pmu_probe(device_t dev)
71{
72
73 if (!ofw_bus_status_okay(dev))
74 return (ENXIO);
75
73 if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-pmu")) {
74 device_set_desc(dev, "RK30XX PMU");
75 return(BUS_PROBE_DEFAULT);
76 }
77
78 return (ENXIO);
79}
80

--- 49 unchanged lines hidden ---
76 if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-pmu")) {
77 device_set_desc(dev, "RK30XX PMU");
78 return(BUS_PROBE_DEFAULT);
79 }
80
81 return (ENXIO);
82}
83

--- 49 unchanged lines hidden ---