// SPDX-License-Identifier: GPL-2.0-or-later /* * smssdio.c - Siano 1xxx SDIO interface driver * * Copyright 2008 Pierre Ossman * * Based on code by Siano Mobile Silicon, Inc., * Copyright (C) 2006-2008, Uri Shkolnik * * This hardware is a bit odd in that all transfers should be done * to/from the SMSSDIO_DATA register, yet the "increase address" bit * always needs to be set. * * Also, buffers from the card are always aligned to 128 byte * boundaries. */ /* * General cleanup notes: * * - only typedefs should be name *_t * * - use ERR_PTR and friends for smscore_register_device() * * - smscore_getbuffer should zero fields * * Fix stop command */ #include "smscoreapi.h" #include <linux/moduleparam.h> #include <linux/slab.h> #include <linux/firmware.h> #include <linux/delay.h> #include <linux/mmc/card.h> #include <linux/mmc/sdio_func.h> #include <linux/mmc/sdio_ids.h> #include <linux/module.h> #include "sms-cards.h" #include "smsendian.h" /* Registers */ #define SMSSDIO_DATA … #define SMSSDIO_INT … #define SMSSDIO_BLOCK_SIZE … static const struct sdio_device_id smssdio_ids[] = …; MODULE_DEVICE_TABLE(sdio, smssdio_ids); struct smssdio_device { … }; /*******************************************************************/ /* Siano core callbacks */ /*******************************************************************/ static int smssdio_sendrequest(void *context, void *buffer, size_t size) { … } /*******************************************************************/ /* SDIO callbacks */ /*******************************************************************/ static void smssdio_interrupt(struct sdio_func *func) { … } static int smssdio_probe(struct sdio_func *func, const struct sdio_device_id *id) { … } static void smssdio_remove(struct sdio_func *func) { … } static struct sdio_driver smssdio_driver = …; module_sdio_driver(…) …; MODULE_DESCRIPTION(…) …; MODULE_AUTHOR(…) …; MODULE_LICENSE(…) …;