summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-06-10 21:20:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2009-07-21 16:41:46 +0200
commit4b34297cfbf8b6d88a602898f0db05b5bf5bf8fd (patch)
tree8b414f0b816d7faea139e8e6de2c3aaa0b8207a2
parent6459b135d9f1cc1aee8d3564a6097ae21e30b2ac (diff)
downloadbarebox-4b34297cfbf8b6d88a602898f0db05b5bf5bf8fd.tar.gz
barebox-4b34297cfbf8b6d88a602898f0db05b5bf5bf8fd.tar.xz
Get rid of remaining DEVICE_TYPE_* usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--Documentation/devices_drivers.txt9
-rw-r--r--Documentation/porting.txt2
-rw-r--r--board/sandbox/hostfile.c2
-rw-r--r--commands/nand.c4
-rw-r--r--drivers/nand/nand.c1
-rw-r--r--include/driver.h21
6 files changed, 3 insertions, 36 deletions
diff --git a/Documentation/devices_drivers.txt b/Documentation/devices_drivers.txt
index 5a95c91732..06e788de86 100644
--- a/Documentation/devices_drivers.txt
+++ b/Documentation/devices_drivers.txt
@@ -26,17 +26,10 @@ char id[MAX_DRIVER_NAME];
The id is used to uniquely identify a device in the system. The id will show up
under /dev/ as the device's name. Usually this is something like eth0 or nor0.
-unsigned long type;
-
-This describes the type (or class) of this device. Have a look at include/driver.h
-to see a list of known device types. Currently this includes DEVICE_TYPE_ETHER,
-DEVICE_TYPE_CONSOLE and others.
-
void *type_data;
Devices of a particular class normaly need to store more information than struct
-device holds. This entry holds a pointer to the type specific struct, so a
-a device of type DEVICE_TYPE_ETHER sets this to a struct eth_device.
+device holds. This entry holds a pointer to the type specific struct.
void *priv;
diff --git a/Documentation/porting.txt b/Documentation/porting.txt
index 93532a80c8..d59925e5f6 100644
--- a/Documentation/porting.txt
+++ b/Documentation/porting.txt
@@ -37,7 +37,6 @@ static struct device_d scb9328_serial_device = {
.id = "cs0",
.map_base = IMX_UART1_BASE,
.size = 4096,
- .type = DEVICE_TYPE_CONSOLE,
};
static int scb9328_console_init(void)
@@ -61,7 +60,6 @@ console_initcall(scb9328_console_init);
Serial drivers
- Declare all functions static.
- - register a device of type DEVICE_TYPE_CONSOLE
- in your probe function fill in a struct console_device and register it
with console_register()
diff --git a/board/sandbox/hostfile.c b/board/sandbox/hostfile.c
index 6521722209..b6f1dbd3d7 100644
--- a/board/sandbox/hostfile.c
+++ b/board/sandbox/hostfile.c
@@ -64,7 +64,6 @@ static struct driver_d hf_drv = {
.read = hf_read,
.write = hf_write,
.info = hf_info,
- .type = DEVICE_TYPE_BLOCK,
};
static int hf_init(void)
@@ -88,7 +87,6 @@ int u_boot_register_filedev(struct hf_platform_data *hf, char *name_template)
get_free_deviceid(dev->id, name_template);
dev->size = hf->size;
dev->map_base = hf->map_base;
- dev->type = DEVICE_TYPE_BLOCK;
return register_device(dev);
}
diff --git a/commands/nand.c b/commands/nand.c
index 9776443829..f7406fde4a 100644
--- a/commands/nand.c
+++ b/commands/nand.c
@@ -272,10 +272,6 @@ static int do_nand(cmd_tbl_t *cmdtp, int argc, char *argv[])
}
dev = cdev->dev;
- if (dev->type != DEVICE_TYPE_NAND_BB) {
- printf("not a nand bb device: %s\n", dev);
- return 1;
- }
bb = dev->priv;
close(bb->fd);
unregister_device(dev);
diff --git a/drivers/nand/nand.c b/drivers/nand/nand.c
index 5f5e83a841..f90a7ecece 100644
--- a/drivers/nand/nand.c
+++ b/drivers/nand/nand.c
@@ -160,7 +160,6 @@ static int nand_device_probe(struct device_d *dev)
static struct driver_d nand_device_driver = {
.name = "nand_device",
.probe = nand_device_probe,
- .type = DEVICE_TYPE_NAND,
};
static int nand_init(void)
diff --git a/include/driver.h b/include/driver.h
index 98d54ad3ad..80045183b7 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -27,18 +27,6 @@
#define MAX_DRIVER_NAME 32
-#define DEVICE_TYPE_UNKNOWN 0
-#define DEVICE_TYPE_ETHER 1
-#define DEVICE_TYPE_CONSOLE 2
-#define DEVICE_TYPE_DRAM 3
-#define DEVICE_TYPE_BLOCK 4
-#define DEVICE_TYPE_FS 5
-#define DEVICE_TYPE_MIIPHY 6
-#define DEVICE_TYPE_NAND 7
-#define DEVICE_TYPE_NAND_BB 8
-#define DEVICE_TYPE_PARTITION 9
-#define MAX_DEVICE_TYPE 9
-
#include <param.h>
/**
@@ -91,9 +79,8 @@ struct device_d {
void *platform_data; /*! board specific information about this device */
/*! Devices of a particular class normaly need to store more
- * information than struct device holds. This entry holds a pointer to
- * the type specific struct, so a a device of type DEVICE_TYPE_ETHER
- * sets this to a struct eth_device. */
+ * information than struct device holds.
+ */
void *priv;
void *type_data; /*! In case this device is a specific device, this pointer
* points to the type specific device, i.e. eth_device
@@ -107,11 +94,7 @@ struct device_d {
struct device_d *parent; /* our parent, NULL if not present */
- /*! This describes the type (or class) of this device. Have a look at
- * include/driver.h to see a list of known device types. Currently this
- * includes DEVICE_TYPE_ETHER, DEVICE_TYPE_CONSOLE and others. */
struct bus_type *bus;
- unsigned long type;
/*! The parameters for this device. This is used to carry information
* of board specific data from the board code to the device driver. */