On Fri, 2012-03-02 at 10:20 +0100, Rafał Miłecki wrote: > 2012/3/2 Nathan Hintz <nlhi...@hotmail.com>: > > Support recognition of MIPS 74K CPU, etc. > > > > [ 0.000000] bcma: Core 3 found: MIPS 74K (manuf 0x4A7, id 0x82C, rev > > 0x01, class 0x0) > > > > Signed-off-by: Nathan Hintz <nlhi...@hotmail.com> > > > > --- /dev/null 2012-02-21 01:00:44.969496803 -0800 > > +++ > > target/linux/brcm47xx/patches-3.2/0050-bcma-find-name-for-non-brcm.patch > > 2011-07-02 16:50:16.000000000 -0700 > > @@ -0,0 +1,17 @@ > > +--- a/drivers/bcma/scan.c > > ++++ b/drivers/bcma/scan.c > > +@@ -83,11 +83,9 @@ > > + { > > + int i; > > + > > +- if (id->manuf == BCMA_MANUF_BCM) { > > +- for (i = 0; i < ARRAY_SIZE(bcma_device_names); i++) { > > +- if (bcma_device_names[i].id == id->id) > > +- return bcma_device_names[i].name; > > +- } > > ++ for (i = 0; i < ARRAY_SIZE(bcma_device_names); i++) { > > ++ if (bcma_device_names[i].id == id->id) > > ++ return bcma_device_names[i].name; > > Maybe you should just make use of: > /* Core manufacturers */ > #define BCMA_MANUF_ARM 0x43B > #define BCMA_MANUF_MIPS 0x4A7 > #define BCMA_MANUF_BCM 0x4BF > rather than dropping the check. > Aren't we pretty much assured it is one of those three already? It is already known that at least some ID's are unique to a manufacturer, maybe the manufacturer should be embedded in the "bcma_device_names" table, along with a "BCMA_MANUF_ANY" for ones that are common.
Nathan _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel