aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-09-18 15:12:50 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:36 -0400
commit61e115a56d1aafd6e6a8a9fee8ac099a6128ac7b (patch)
treeadd97bf6a1207a4caea3a86cf13495ad3dc477de /scripts/mod/file2alias.c
parent5ee3afba88f5a79d0bff07ddd87af45919259f91 (diff)
[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/mod/file2alias.c')
-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,
484 return 1; 484 return 1;
485} 485}
486 486
487/* Looks like: ssb:vNidNrevN. */
488static int do_ssb_entry(const char *filename,
489 struct ssb_device_id *id, char *alias)
490{
491 id->vendor = TO_NATIVE(id->vendor);
492 id->coreid = TO_NATIVE(id->coreid);
493 id->revision = TO_NATIVE(id->revision);
494
495 strcpy(alias, "ssb:");
496 ADD(alias, "v", id->vendor != SSB_ANY_VENDOR, id->vendor);
497 ADD(alias, "id", id->coreid != SSB_ANY_ID, id->coreid);
498 ADD(alias, "rev", id->revision != SSB_ANY_REV, id->revision);
499 return 1;
500}
501
487/* Ignore any prefix, eg. v850 prepends _ */ 502/* Ignore any prefix, eg. v850 prepends _ */
488static inline int sym_is(const char *symbol, const char *name) 503static inline int sym_is(const char *symbol, const char *name)
489{ 504{
@@ -599,6 +614,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
599 do_table(symval, sym->st_size, 614 do_table(symval, sym->st_size,
600 sizeof(struct parisc_device_id), "parisc", 615 sizeof(struct parisc_device_id), "parisc",
601 do_parisc_entry, mod); 616 do_parisc_entry, mod);
617 else if (sym_is(symname, "__mod_ssb_device_table"))
618 do_table(symval, sym->st_size,
619 sizeof(struct ssb_device_id), "ssb",
620 do_ssb_entry, mod);
602} 621}
603 622
604/* Now add out buffered information to the generated C source */ 623/* Now add out buffered information to the generated C source */