lpc_gpio.c (261410) | lpc_gpio.c (265858) |
---|---|
1/*- 2 * Copyright (c) 2011 Jakub Wojciech Klama <jceel@FreeBSD.org> 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 --- 36 unchanged lines hidden (view full) --- 45 * [52..64] -> P2.0..P2.12 (port 2) 46 * [65..88] -> P1.0..P1.23 (port 1) 47 * [89..96] -> P0.0..P0.7 (port 0) 48 * 49 */ 50 51 52#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2011 Jakub Wojciech Klama <jceel@FreeBSD.org> 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 --- 36 unchanged lines hidden (view full) --- 45 * [52..64] -> P2.0..P2.12 (port 2) 46 * [65..88] -> P1.0..P1.23 (port 1) 47 * [89..96] -> P0.0..P0.7 (port 0) 48 * 49 */ 50 51 52#include <sys/cdefs.h> |
53__FBSDID("$FreeBSD: head/sys/arm/lpc/lpc_gpio.c 261410 2014-02-02 19:17:28Z ian $"); | 53__FBSDID("$FreeBSD: head/sys/arm/lpc/lpc_gpio.c 265858 2014-05-10 21:30:19Z andrew $"); |
54 55#include <sys/param.h> 56#include <sys/systm.h> 57#include <sys/bio.h> 58#include <sys/bus.h> 59#include <sys/conf.h> 60#include <sys/endian.h> 61#include <sys/kernel.h> --- 437 unchanged lines hidden (view full) --- 499{ 500 if (lpc_gpio_sc == NULL) 501 return (ENXIO); 502 503 return lpc_gpio_pin_get(lpc_gpio_sc->lg_dev, pin, state); 504} 505 506void | 54 55#include <sys/param.h> 56#include <sys/systm.h> 57#include <sys/bio.h> 58#include <sys/bus.h> 59#include <sys/conf.h> 60#include <sys/endian.h> 61#include <sys/kernel.h> --- 437 unchanged lines hidden (view full) --- 499{ 500 if (lpc_gpio_sc == NULL) 501 return (ENXIO); 502 503 return lpc_gpio_pin_get(lpc_gpio_sc->lg_dev, pin, state); 504} 505 506void |
507platform_gpio_init() | 507lpc_gpio_init() |
508{ 509 bus_space_tag_t bst; 510 bus_space_handle_t bsh; 511 512 bst = fdtbus_bs_tag; 513 514 /* Preset SPI devices CS pins to one */ 515 bus_space_map(bst, LPC_GPIO_PHYS_BASE, LPC_GPIO_SIZE, 0, &bsh); --- 41 unchanged lines hidden --- | 508{ 509 bus_space_tag_t bst; 510 bus_space_handle_t bsh; 511 512 bst = fdtbus_bs_tag; 513 514 /* Preset SPI devices CS pins to one */ 515 bus_space_map(bst, LPC_GPIO_PHYS_BASE, LPC_GPIO_SIZE, 0, &bsh); --- 41 unchanged lines hidden --- |