Again, fixes regarding style(4), to comments, includes and unused
parameters.
This commit is contained in:
parent
63b0349233
commit
bb0bcdd7a4
@ -111,7 +111,7 @@ enum mmc_bus_timing {
|
|||||||
|
|
||||||
struct mmc_ios {
|
struct mmc_ios {
|
||||||
uint32_t clock; /* Speed of the clock in Hz to move data */
|
uint32_t clock; /* Speed of the clock in Hz to move data */
|
||||||
enum mmc_vdd vdd; /* Voltage to apply to the power pins/ */
|
enum mmc_vdd vdd; /* Voltage to apply to the power pins */
|
||||||
enum mmc_bus_mode bus_mode;
|
enum mmc_bus_mode bus_mode;
|
||||||
enum mmc_chip_select chip_select;
|
enum mmc_chip_select chip_select;
|
||||||
enum mmc_bus_width bus_width;
|
enum mmc_bus_width bus_width;
|
||||||
|
@ -792,6 +792,7 @@ mmc_get_bits(uint32_t *bits, int bit_len, int start, int size)
|
|||||||
const int i = (bit_len / 32) - (start / 32) - 1;
|
const int i = (bit_len / 32) - (start / 32) - 1;
|
||||||
const int shift = start & 31;
|
const int shift = start & 31;
|
||||||
uint32_t retval = bits[i] >> shift;
|
uint32_t retval = bits[i] >> shift;
|
||||||
|
|
||||||
if (size + shift > 32)
|
if (size + shift > 32)
|
||||||
retval |= bits[i - 1] << (32 - shift);
|
retval |= bits[i - 1] << (32 - shift);
|
||||||
return (retval & ((1llu << size) - 1));
|
return (retval & ((1llu << size) - 1));
|
||||||
@ -1464,7 +1465,7 @@ mmc_rescan_cards(struct mmc_softc *sc)
|
|||||||
return;
|
return;
|
||||||
for (i = 0; i < devcount; i++) {
|
for (i = 0; i < devcount; i++) {
|
||||||
ivar = device_get_ivars(devlist[i]);
|
ivar = device_get_ivars(devlist[i]);
|
||||||
if (mmc_select_card(sc, ivar->rca)) {
|
if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE) {
|
||||||
if (bootverbose || mmc_debug)
|
if (bootverbose || mmc_debug)
|
||||||
device_printf(sc->dev,
|
device_printf(sc->dev,
|
||||||
"Card at relative address %d lost.\n",
|
"Card at relative address %d lost.\n",
|
||||||
|
@ -65,8 +65,9 @@
|
|||||||
INTERFACE mmcbr;
|
INTERFACE mmcbr;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Called by the mmcbus to setup the IO pins correctly, the voltage to use
|
# Called by the mmcbus to set up the IO pins correctly, the common/core
|
||||||
# for the card, the type of selects, power modes and bus width.
|
# supply voltage (VDD/VCC) to use for the device, the clock frequency, the
|
||||||
|
# type of SPI chip select, power mode and bus width.
|
||||||
#
|
#
|
||||||
METHOD int update_ios {
|
METHOD int update_ios {
|
||||||
device_t brdev;
|
device_t brdev;
|
||||||
@ -76,8 +77,8 @@ METHOD int update_ios {
|
|||||||
#
|
#
|
||||||
# Called by the mmcbus or its children to schedule a mmc request. These
|
# Called by the mmcbus or its children to schedule a mmc request. These
|
||||||
# requests are queued. Time passes. The bridge then gets notification
|
# requests are queued. Time passes. The bridge then gets notification
|
||||||
# of the status of request, who then notifies the requesting device via
|
# of the status of the request, who then notifies the requesting device
|
||||||
# the xfer_done mmcbus method.
|
# by calling the completion function supplied as part of the request.
|
||||||
#
|
#
|
||||||
METHOD int request {
|
METHOD int request {
|
||||||
device_t brdev;
|
device_t brdev;
|
||||||
|
@ -309,9 +309,8 @@ sdhci_set_clock(struct sdhci_slot *slot, uint32_t clock)
|
|||||||
}
|
}
|
||||||
/* Divider 1:1 is 0x00, 2:1 is 0x01, 256:1 is 0x80 ... */
|
/* Divider 1:1 is 0x00, 2:1 is 0x01, 256:1 is 0x80 ... */
|
||||||
div >>= 1;
|
div >>= 1;
|
||||||
}
|
} else {
|
||||||
else {
|
/* Version 3.0 divisors are multiples of two up to 1023 * 2 */
|
||||||
/* Version 3.0 divisors are multiples of two up to 1023*2 */
|
|
||||||
if (clock >= clk_base)
|
if (clock >= clk_base)
|
||||||
div = 0;
|
div = 0;
|
||||||
else {
|
else {
|
||||||
@ -1349,7 +1348,7 @@ sdhci_data_irq(struct sdhci_slot *slot, uint32_t intmask)
|
|||||||
if (intmask & SDHCI_INT_DMA_END) {
|
if (intmask & SDHCI_INT_DMA_END) {
|
||||||
data = slot->curcmd->data;
|
data = slot->curcmd->data;
|
||||||
|
|
||||||
/* Unload DMA buffer... */
|
/* Unload DMA buffer ... */
|
||||||
left = data->len - slot->offset;
|
left = data->len - slot->offset;
|
||||||
if (data->flags & MMC_DATA_READ) {
|
if (data->flags & MMC_DATA_READ) {
|
||||||
bus_dmamap_sync(slot->dmatag, slot->dmamap,
|
bus_dmamap_sync(slot->dmatag, slot->dmamap,
|
||||||
|
@ -87,7 +87,8 @@ static void sdhci_acpi_intr(void *arg);
|
|||||||
static int sdhci_acpi_detach(device_t dev);
|
static int sdhci_acpi_detach(device_t dev);
|
||||||
|
|
||||||
static uint8_t
|
static uint8_t
|
||||||
sdhci_acpi_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
sdhci_acpi_read_1(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
|
bus_size_t off)
|
||||||
{
|
{
|
||||||
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -97,8 +98,8 @@ sdhci_acpi_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_acpi_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
sdhci_acpi_write_1(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
uint8_t val)
|
bus_size_t off, uint8_t val)
|
||||||
{
|
{
|
||||||
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -108,7 +109,8 @@ sdhci_acpi_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint16_t
|
static uint16_t
|
||||||
sdhci_acpi_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
sdhci_acpi_read_2(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
|
bus_size_t off)
|
||||||
{
|
{
|
||||||
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -118,8 +120,8 @@ sdhci_acpi_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_acpi_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
sdhci_acpi_write_2(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
uint16_t val)
|
bus_size_t off, uint16_t val)
|
||||||
{
|
{
|
||||||
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -129,7 +131,8 @@ sdhci_acpi_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t
|
static uint32_t
|
||||||
sdhci_acpi_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
sdhci_acpi_read_4(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
|
bus_size_t off)
|
||||||
{
|
{
|
||||||
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -139,8 +142,8 @@ sdhci_acpi_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_acpi_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
sdhci_acpi_write_4(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
uint32_t val)
|
bus_size_t off, uint32_t val)
|
||||||
{
|
{
|
||||||
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -150,7 +153,7 @@ sdhci_acpi_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_acpi_read_multi_4(device_t dev, struct sdhci_slot *slot,
|
sdhci_acpi_read_multi_4(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
bus_size_t off, uint32_t *data, bus_size_t count)
|
bus_size_t off, uint32_t *data, bus_size_t count)
|
||||||
{
|
{
|
||||||
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
||||||
@ -159,7 +162,7 @@ sdhci_acpi_read_multi_4(device_t dev, struct sdhci_slot *slot,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_acpi_write_multi_4(device_t dev, struct sdhci_slot *slot,
|
sdhci_acpi_write_multi_4(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
bus_size_t off, uint32_t *data, bus_size_t count)
|
bus_size_t off, uint32_t *data, bus_size_t count)
|
||||||
{
|
{
|
||||||
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
struct sdhci_acpi_softc *sc = device_get_softc(dev);
|
||||||
|
@ -59,22 +59,13 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/bus.h>
|
||||||
#include <sys/lock.h>
|
|
||||||
#include <sys/mutex.h>
|
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <sys/taskqueue.h>
|
#include <sys/taskqueue.h>
|
||||||
|
|
||||||
#include <machine/bus.h>
|
|
||||||
|
|
||||||
#include <dev/mmc/bridge.h>
|
#include <dev/mmc/bridge.h>
|
||||||
#include <dev/mmc/mmcreg.h>
|
|
||||||
#include <dev/sdhci/sdhci.h>
|
#include <dev/sdhci/sdhci.h>
|
||||||
|
|
||||||
CODE {
|
|
||||||
struct sdhci_slot;
|
|
||||||
}
|
|
||||||
|
|
||||||
INTERFACE sdhci;
|
INTERFACE sdhci;
|
||||||
|
|
||||||
METHOD uint8_t read_1 {
|
METHOD uint8_t read_1 {
|
||||||
|
@ -147,7 +147,7 @@ SYSCTL_INT(_hw_sdhci, OID_AUTO, enable_msi, CTLFLAG_RDTUN, &sdhci_enable_msi,
|
|||||||
0, "Enable MSI interrupts");
|
0, "Enable MSI interrupts");
|
||||||
|
|
||||||
static uint8_t
|
static uint8_t
|
||||||
sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off)
|
||||||
{
|
{
|
||||||
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -157,8 +157,8 @@ sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_pci_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
sdhci_pci_write_1(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
uint8_t val)
|
bus_size_t off, uint8_t val)
|
||||||
{
|
{
|
||||||
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ sdhci_pci_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint16_t
|
static uint16_t
|
||||||
sdhci_pci_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
sdhci_pci_read_2(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off)
|
||||||
{
|
{
|
||||||
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -178,8 +178,8 @@ sdhci_pci_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_pci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
sdhci_pci_write_2(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
uint16_t val)
|
bus_size_t off, uint16_t val)
|
||||||
{
|
{
|
||||||
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ sdhci_pci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t
|
static uint32_t
|
||||||
sdhci_pci_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
sdhci_pci_read_4(device_t dev, struct sdhci_slot *slot __unused, bus_size_t off)
|
||||||
{
|
{
|
||||||
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -199,8 +199,8 @@ sdhci_pci_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_pci_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
sdhci_pci_write_4(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
uint32_t val)
|
bus_size_t off, uint32_t val)
|
||||||
{
|
{
|
||||||
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ sdhci_pci_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_pci_read_multi_4(device_t dev, struct sdhci_slot *slot,
|
sdhci_pci_read_multi_4(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
bus_size_t off, uint32_t *data, bus_size_t count)
|
bus_size_t off, uint32_t *data, bus_size_t count)
|
||||||
{
|
{
|
||||||
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
||||||
@ -219,7 +219,7 @@ sdhci_pci_read_multi_4(device_t dev, struct sdhci_slot *slot,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sdhci_pci_write_multi_4(device_t dev, struct sdhci_slot *slot,
|
sdhci_pci_write_multi_4(device_t dev, struct sdhci_slot *slot __unused,
|
||||||
bus_size_t off, uint32_t *data, bus_size_t count)
|
bus_size_t off, uint32_t *data, bus_size_t count)
|
||||||
{
|
{
|
||||||
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
struct sdhci_pci_softc *sc = device_get_softc(dev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user