mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 09:44:18 +08:00
e6b5be2be4
Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlSOD20ACgkQMUfUDdst+ylLPACg2QrW1oHhdTMT9WI8jihlHVRM 53kAoLeteByQ3iVwWurwwseRPiWa8+MI =OVRS -----END PGP SIGNATURE----- Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
138 lines
3.9 KiB
C
138 lines
3.9 KiB
C
/*======================================================================
|
|
|
|
Device driver for the PCMCIA control functionality of StrongARM
|
|
SA-1100 microprocessors.
|
|
|
|
The contents of this file are subject to the Mozilla Public
|
|
License Version 1.1 (the "License"); you may not use this file
|
|
except in compliance with the License. You may obtain a copy of
|
|
the License at http://www.mozilla.org/MPL/
|
|
|
|
Software distributed under the License is distributed on an "AS
|
|
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
implied. See the License for the specific language governing
|
|
rights and limitations under the License.
|
|
|
|
The initial developer of the original code is John G. Dorsey
|
|
<john+@cs.cmu.edu>. Portions created by John G. Dorsey are
|
|
Copyright (C) 1999 John G. Dorsey. All Rights Reserved.
|
|
|
|
Alternatively, the contents of this file may be used under the
|
|
terms of the GNU Public License version 2 (the "GPL"), in which
|
|
case the provisions of the GPL are applicable instead of the
|
|
above. If you wish to allow the use of your version of this file
|
|
only under the terms of the GPL and not to allow others to use
|
|
your version of this file under the MPL, indicate your decision
|
|
by deleting the provisions above and replace them with the notice
|
|
and other provisions required by the GPL. If you do not delete
|
|
the provisions above, a recipient may use your version of this
|
|
file under either the MPL or the GPL.
|
|
|
|
======================================================================*/
|
|
|
|
#include <linux/module.h>
|
|
#include <linux/init.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <pcmcia/ss.h>
|
|
|
|
#include <asm/hardware/scoop.h>
|
|
|
|
#include "sa1100_generic.h"
|
|
|
|
int __init pcmcia_collie_init(struct device *dev);
|
|
|
|
static int (*sa11x0_pcmcia_hw_init[])(struct device *dev) = {
|
|
#ifdef CONFIG_SA1100_ASSABET
|
|
pcmcia_assabet_init,
|
|
#endif
|
|
#ifdef CONFIG_SA1100_CERF
|
|
pcmcia_cerf_init,
|
|
#endif
|
|
#if defined(CONFIG_SA1100_H3100) || defined(CONFIG_SA1100_H3600)
|
|
pcmcia_h3600_init,
|
|
#endif
|
|
#ifdef CONFIG_SA1100_NANOENGINE
|
|
pcmcia_nanoengine_init,
|
|
#endif
|
|
#ifdef CONFIG_SA1100_SHANNON
|
|
pcmcia_shannon_init,
|
|
#endif
|
|
#ifdef CONFIG_SA1100_SIMPAD
|
|
pcmcia_simpad_init,
|
|
#endif
|
|
#ifdef CONFIG_SA1100_COLLIE
|
|
pcmcia_collie_init,
|
|
#endif
|
|
};
|
|
|
|
static int sa11x0_drv_pcmcia_probe(struct platform_device *dev)
|
|
{
|
|
int i, ret = -ENODEV;
|
|
|
|
/*
|
|
* Initialise any "on-board" PCMCIA sockets.
|
|
*/
|
|
for (i = 0; i < ARRAY_SIZE(sa11x0_pcmcia_hw_init); i++) {
|
|
ret = sa11x0_pcmcia_hw_init[i](&dev->dev);
|
|
if (ret == 0)
|
|
break;
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
|
|
static int sa11x0_drv_pcmcia_remove(struct platform_device *dev)
|
|
{
|
|
struct skt_dev_info *sinfo = platform_get_drvdata(dev);
|
|
int i;
|
|
|
|
platform_set_drvdata(dev, NULL);
|
|
|
|
for (i = 0; i < sinfo->nskt; i++)
|
|
soc_pcmcia_remove_one(&sinfo->skt[i]);
|
|
|
|
clk_put(sinfo->clk);
|
|
kfree(sinfo);
|
|
return 0;
|
|
}
|
|
|
|
static struct platform_driver sa11x0_pcmcia_driver = {
|
|
.driver = {
|
|
.name = "sa11x0-pcmcia",
|
|
},
|
|
.probe = sa11x0_drv_pcmcia_probe,
|
|
.remove = sa11x0_drv_pcmcia_remove,
|
|
};
|
|
|
|
/* sa11x0_pcmcia_init()
|
|
* ^^^^^^^^^^^^^^^^^^^^
|
|
*
|
|
* This routine performs low-level PCMCIA initialization and then
|
|
* registers this socket driver with Card Services.
|
|
*
|
|
* Returns: 0 on success, -ve error code on failure
|
|
*/
|
|
static int __init sa11x0_pcmcia_init(void)
|
|
{
|
|
return platform_driver_register(&sa11x0_pcmcia_driver);
|
|
}
|
|
|
|
/* sa11x0_pcmcia_exit()
|
|
* ^^^^^^^^^^^^^^^^^^^^
|
|
* Invokes the low-level kernel service to free IRQs associated with this
|
|
* socket controller and reset GPIO edge detection.
|
|
*/
|
|
static void __exit sa11x0_pcmcia_exit(void)
|
|
{
|
|
platform_driver_unregister(&sa11x0_pcmcia_driver);
|
|
}
|
|
|
|
MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
|
|
MODULE_DESCRIPTION("Linux PCMCIA Card Services: SA-11x0 Socket Controller");
|
|
MODULE_LICENSE("Dual MPL/GPL");
|
|
|
|
fs_initcall(sa11x0_pcmcia_init);
|
|
module_exit(sa11x0_pcmcia_exit);
|