mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 17:48:58 +00:00
3ccdc15c6a
Add multiple patch to make the package compilable again. Aside from some fixup of obvius wrong code, some real fix were needed. This fix any compilation warning found on compiling the package on bcm47xx. (omitted since they are too much) The real problem of this package was the missing MODULE_LICENSE now mandatory even without WERROR. Set to Proprietary. And the big blocker is that Broadcom provided an object file targetting an old kernel version. The module on modprobe try to find the symbol printk but printk was dropped and replaced to _printk. To handle this change we use objcopy tool to rename the symbol to the new name permitting a correct modprobe and creation of .ko Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
64 lines
2.0 KiB
Diff
64 lines
2.0 KiB
Diff
--- a/driver/hnddma.c
|
|
+++ b/driver/hnddma.c
|
|
@@ -1896,7 +1896,8 @@ dma64_txfast(dma_info_t *di, void *p0, bool commit)
|
|
if (!(flags & D64_CTRL1_EOF)) {
|
|
#if defined(linux) && defined(__mips__)
|
|
if (CHIPID(di->sih->chip) == BCM5356_CHIP_ID && di->sih->chiprev == 0) {
|
|
- uint32 ctrl1, ctrl2, addrlow, addrhigh;
|
|
+ uint32 ctrl2, addrlow, addrhigh;
|
|
+ // uint32 ctrl1;
|
|
|
|
addrlow = R_SM((volatile uint32 *)&di->txd64[PREVTXD(txout)].addrlow);
|
|
addrhigh = R_SM((volatile uint32 *)&di->txd64[PREVTXD(txout)].addrhigh);
|
|
|
|
--- a/driver/include/linux_osl.h
|
|
+++ b/driver/include/linux_osl.h
|
|
@@ -580,9 +580,9 @@ extern void osl_writew(uint16 v, volatile uint16 *r);
|
|
extern void osl_writel(uint32 v, volatile uint32 *r);
|
|
|
|
/* uncached/cached virtual address */
|
|
-#define OSL_UNCACHED(va) osl_uncached((va))
|
|
+#define OSL_UNCACHED(va) osl_uncached((void *)(va))
|
|
extern void *osl_uncached(void *va);
|
|
-#define OSL_CACHED(va) osl_cached((va))
|
|
+#define OSL_CACHED(va) osl_cached((void *)(va))
|
|
extern void *osl_cached(void *va);
|
|
|
|
/* get processor cycle count */
|
|
--- a/driver/siutils.c
|
|
+++ b/driver/siutils.c
|
|
@@ -495,11 +495,13 @@ BCMATTACHFN(si_doattach)(si_info_t *sii, uint devid, osl_t *osh, void *regs,
|
|
}
|
|
|
|
sih->bustype = bustype;
|
|
+#ifdef BCMBUSTYPE
|
|
if (bustype != BUSTYPE(bustype)) {
|
|
SI_ERROR(("si_doattach: bus type %d does not match configured bus type %d\n",
|
|
bustype, BUSTYPE(bustype)));
|
|
return NULL;
|
|
}
|
|
+#endif
|
|
|
|
/* bus/core/clk setup for register access */
|
|
if (!si_buscore_prep(sii, bustype, devid, sdh)) {
|
|
@@ -1716,6 +1718,9 @@ si_clkctl_xtal(si_t *sih, uint what, bool on)
|
|
outen);
|
|
}
|
|
|
|
+ return (0);
|
|
+
|
|
+
|
|
default:
|
|
return (-1);
|
|
}
|
|
--- a/driver/bcmsrom.c
|
|
+++ b/driver/bcmsrom.c
|
|
@@ -1005,6 +1043,7 @@ BCMNMIATTACHFN(srom_parsecis)(osl_t *osh, uint8 *pcis[], uint ciscnt, char **var
|
|
break;
|
|
}
|
|
|
|
+ fallthrough;
|
|
case CISTPL_MANFID: FROMHOST();
|
|
varbuf_append(&b, vstr_manfid, (cis[i + 1] << 8) + cis[i]);
|
|
varbuf_append(&b, vstr_prodid, (cis[i + 3] << 8) + cis[i + 2]);
|