summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-09-18 23:12:50 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 03:51:36 +0400
commit61e115a56d1aafd6e6a8a9fee8ac099a6128ac7b (patch)
treeadd97bf6a1207a4caea3a86cf13495ad3dc477de /scripts
parent5ee3afba88f5a79d0bff07ddd87af45919259f91 (diff)
downloadlinux-61e115a56d1aafd6e6a8a9fee8ac099a6128ac7b.tar.xz
[SSB]: add Sonics Silicon Backplane bus support
SSB is an SoC bus used in a number of embedded devices. The most well-known of these devices is probably the Linksys WRT54G, but there are others as well. The bus is also used internally on the BCM43xx and BCM44xx devices from Broadcom. This patch also includes support for SSB ID tables in modules, so that SSB drivers can be loaded automatically. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/file2alias.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 8a09021d8c59..895ba3ac6208 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -484,6 +484,21 @@ static int do_parisc_entry(const char *filename, struct parisc_device_id *id,
return 1;
}
+/* Looks like: ssb:vNidNrevN. */
+static int do_ssb_entry(const char *filename,
+ struct ssb_device_id *id, char *alias)
+{
+ id->vendor = TO_NATIVE(id->vendor);
+ id->coreid = TO_NATIVE(id->coreid);
+ id->revision = TO_NATIVE(id->revision);
+
+ strcpy(alias, "ssb:");
+ ADD(alias, "v", id->vendor != SSB_ANY_VENDOR, id->vendor);
+ ADD(alias, "id", id->coreid != SSB_ANY_ID, id->coreid);
+ ADD(alias, "rev", id->revision != SSB_ANY_REV, id->revision);
+ return 1;
+}
+
/* Ignore any prefix, eg. v850 prepends _ */
static inline int sym_is(const char *symbol, const char *name)
{
@@ -599,6 +614,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
do_table(symval, sym->st_size,
sizeof(struct parisc_device_id), "parisc",
do_parisc_entry, mod);
+ else if (sym_is(symname, "__mod_ssb_device_table"))
+ do_table(symval, sym->st_size,
+ sizeof(struct ssb_device_id), "ssb",
+ do_ssb_entry, mod);
}
/* Now add out buffered information to the generated C source */