Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2413
b: refs/heads/master
c: 9527cc7
h: refs/heads/master
i:
  2411: 7d32f19
v: v3
  • Loading branch information
Linus Torvalds committed Jun 21, 2005
1 parent 355e785 commit 7d17584
Show file tree
Hide file tree
Showing 325 changed files with 5,550 additions and 3,191 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d039ba24f135147f60a13bcaa768189a5b773b6e
refs/heads/master: 9527cc77e25b3a3787569edcbb8e74080b8df54a
1 change: 0 additions & 1 deletion trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ X!Earch/i386/kernel/mca.c
X!Iinclude/linux/device.h
-->
!Edrivers/base/driver.c
!Edrivers/base/class_simple.c
!Edrivers/base/core.c
!Edrivers/base/firmware_class.c
!Edrivers/base/transport_class.c
Expand Down
8 changes: 8 additions & 0 deletions trunk/Documentation/driver-model/device.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ driver_data: Driver-specific data.

platform_data: Platform data specific to the device.

Example: for devices on custom boards, as typical of embedded
and SOC based hardware, Linux often uses platform_data to point
to board-specific structures describing devices and how they
are wired. That can include what ports are available, chip
variants, which GPIO pins act in what additional roles, and so
on. This shrinks the "Board Support Packages" (BSPs) and
minimizes board-specific #ifdefs in drivers.

current_state: Current power state of the device.

saved_state: Pointer to saved state of the device. This is usable by
Expand Down
51 changes: 25 additions & 26 deletions trunk/Documentation/driver-model/driver.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ struct device_driver {
char * name;
struct bus_type * bus;

rwlock_t lock;
atomic_t refcount;

list_t bus_list;
struct completion unloaded;
struct kobject kobj;
list_t devices;

struct driver_dir_entry dir;
struct module *owner;

int (*probe) (struct device * dev);
int (*remove) (struct device * dev);

int (*suspend) (struct device * dev, pm_message_t state, u32 level);
int (*resume) (struct device * dev, u32 level);

void (*release) (struct device_driver * drv);
};


Expand Down Expand Up @@ -51,7 +47,6 @@ being converted completely to the new model.
static struct device_driver eepro100_driver = {
.name = "eepro100",
.bus = &pci_bus_type,
.devclass = &ethernet_devclass, /* when it's implemented */

.probe = eepro100_probe,
.remove = eepro100_remove,
Expand Down Expand Up @@ -85,7 +80,6 @@ static struct pci_driver eepro100_driver = {
.driver = {
.name = "eepro100",
.bus = &pci_bus_type,
.devclass = &ethernet_devclass, /* when it's implemented */
.probe = eepro100_probe,
.remove = eepro100_remove,
.suspend = eepro100_suspend,
Expand Down Expand Up @@ -166,27 +160,32 @@ Callbacks

int (*probe) (struct device * dev);

probe is called to verify the existence of a certain type of
hardware. This is called during the driver binding process, after the
bus has verified that the device ID of a device matches one of the
device IDs supported by the driver.

This callback only verifies that there actually is supported hardware
present. It may allocate a driver-specific structure, but it should
not do any initialization of the hardware itself. The device-specific
structure may be stored in the device's driver_data field.

int (*init) (struct device * dev);

init is called during the binding stage. It is called after probe has
successfully returned and the device has been registered with its
class. It is responsible for initializing the hardware.
The probe() entry is called in task context, with the bus's rwsem locked
and the driver partially bound to the device. Drivers commonly use
container_of() to convert "dev" to a bus-specific type, both in probe()
and other routines. That type often provides device resource data, such
as pci_dev.resource[] or platform_device.resources, which is used in
addition to dev->platform_data to initialize the driver.

This callback holds the driver-specific logic to bind the driver to a
given device. That includes verifying that the device is present, that
it's a version the driver can handle, that driver data structures can
be allocated and initialized, and that any hardware can be initialized.
Drivers often store a pointer to their state with dev_set_drvdata().
When the driver has successfully bound itself to that device, then probe()
returns zero and the driver model code will finish its part of binding
the driver to that device.

A driver's probe() may return a negative errno value to indicate that
the driver did not bind to this device, in which case it should have
released all reasources it allocated.

int (*remove) (struct device * dev);

remove is called to dissociate a driver with a device. This may be
remove is called to unbind a driver from a device. This may be
called if a device is physically removed from the system, if the
driver module is being unloaded, or during a reboot sequence.
driver module is being unloaded, during a reboot sequence, or
in other cases.

It is up to the driver to determine if the device is present or
not. It should free any resources allocated specifically for the
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/filesystems/sysfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Other notes:

A very simple (and naive) implementation of a device attribute is:

static ssize_t show_name(struct device * dev, char * buf)
static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf)
{
return sprintf(buf,"%s\n",dev->name);
}
Expand Down
13 changes: 8 additions & 5 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ config GENERIC_BUST_SPINLOCK
config GENERIC_ISA_DMA
bool

config GENERIC_IOMAP
bool
default y

config FIQ
bool

Expand Down Expand Up @@ -202,6 +198,11 @@ config ARCH_H720X
help
This enables support for systems based on the Hynix HMS720x

config ARCH_AAEC2000
bool "Agilent AAEC-2000 based"
help
This enables support for systems based on the Agilent AAEC-2000

endchoice

source "arch/arm/mach-clps711x/Kconfig"
Expand Down Expand Up @@ -234,6 +235,8 @@ source "arch/arm/mach-h720x/Kconfig"

source "arch/arm/mach-versatile/Kconfig"

source "arch/arm/mach-aaec2000/Kconfig"

# Definitions to make life easier
config ARCH_ACORN
bool
Expand Down Expand Up @@ -277,7 +280,7 @@ config ISA_DMA_API
default y

config PCI
bool "PCI support" if ARCH_INTEGRATOR_AP
bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB
help
Find out whether you have a PCI motherboard. PCI is the name of a
bus system, i.e. the way the CPU talks to the other stuff inside
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
machine-$(CONFIG_ARCH_VERSATILE) := versatile
machine-$(CONFIG_ARCH_IMX) := imx
machine-$(CONFIG_ARCH_H720X) := h720x
machine-$(CONFIG_ARCH_AAEC2000) := aaec2000

ifeq ($(CONFIG_ARCH_EBSA110),y)
# This is what happens if you forget the IOCS16 line.
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/common/amba.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void amba_device_release(struct device *dev)
}

#define amba_attr(name,fmt,arg...) \
static ssize_t show_##name(struct device *_dev, char *buf) \
static ssize_t show_##name(struct device *_dev, struct device_attribute *attr, char *buf) \
{ \
struct amba_device *dev = to_amba_device(_dev); \
return sprintf(buf, fmt, arg); \
Expand Down
18 changes: 16 additions & 2 deletions trunk/arch/arm/common/dmabounce.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include <linux/dmapool.h>
#include <linux/list.h>

#include <asm/cacheflush.h>

#undef DEBUG

#undef STATS
Expand Down Expand Up @@ -302,12 +304,24 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,

DO_STATS ( device_info->bounce_count++ );

if ((dir == DMA_FROM_DEVICE) ||
(dir == DMA_BIDIRECTIONAL)) {
if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
unsigned long ptr;

dev_dbg(dev,
"%s: copy back safe %p to unsafe %p size %d\n",
__func__, buf->safe, buf->ptr, size);
memcpy(buf->ptr, buf->safe, size);

/*
* DMA buffers must have the same cache properties
* as if they were really used for DMA - which means
* data must be written back to RAM. Note that
* we don't use dmac_flush_range() here for the
* bidirectional case because we know the cache
* lines will be coherent with the data written.
*/
ptr = (unsigned long)buf->ptr;
dmac_clean_range(ptr, ptr + size);
}
free_safe_buffer(device_info, buf);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/common/sharpsl_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* them early in the boot process, then pass them to the appropriate drivers.
* Not all devices use all paramaters but the format is common to all.
*/
#ifdef ARCH_SA1100
#ifdef CONFIG_ARCH_SA1100
#define PARAM_BASE 0xe8ffc000
#else
#define PARAM_BASE 0xa0000a00
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/configs/enp2611_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0
#
# Loadable module support
#
# CONFIG_MODULES is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# System Type
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/configs/ixdp2400_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0
#
# Loadable module support
#
# CONFIG_MODULES is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# System Type
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/configs/ixdp2401_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0
#
# Loadable module support
#
# CONFIG_MODULES is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# System Type
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/configs/ixdp2800_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0
#
# Loadable module support
#
# CONFIG_MODULES is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# System Type
Expand Down
8 changes: 7 additions & 1 deletion trunk/arch/arm/configs/ixdp2801_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0
#
# Loadable module support
#
# CONFIG_MODULES is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# System Type
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)

# Object file lists.

obj-y := arch.o compat.o dma.o entry-armv.o entry-common.o irq.o \
obj-y := compat.o dma.o entry-armv.o entry-common.o irq.o \
process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
time.o traps.o

Expand Down
46 changes: 0 additions & 46 deletions trunk/arch/arm/kernel/arch.c

This file was deleted.

Loading

0 comments on commit 7d17584

Please sign in to comment.