mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-08-20 17:40:13 +03:00
brcm47xx: some checkpatch fixes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22425 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
48bf9ccb33
commit
503bfaa4f1
@ -18,14 +18,15 @@
|
|||||||
unsigned long addr, unsigned long pfn)
|
unsigned long addr, unsigned long pfn)
|
||||||
{
|
{
|
||||||
struct flush_cache_page_args args;
|
struct flush_cache_page_args args;
|
||||||
@@ -1469,3 +1469,10 @@ void __cpuinit r4k_cache_init(void)
|
@@ -1469,3 +1469,11 @@ void __cpuinit r4k_cache_init(void)
|
||||||
coherency_setup();
|
coherency_setup();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+// fuse package DCACHE BUG patch exports
|
+/* fuse package DCACHE BUG patch exports */
|
||||||
+void (*fuse_flush_cache_all)(void) = r4k___flush_cache_all;
|
+void (*fuse_flush_cache_all)(void) = r4k___flush_cache_all;
|
||||||
|
+EXPORT_SYMBOL(fuse_flush_cache_all);
|
||||||
|
+
|
||||||
+void (*fuse_flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
|
+void (*fuse_flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
|
||||||
+ unsigned long pfn) = r4k_flush_cache_page;
|
+ unsigned long pfn) = r4k_flush_cache_page;
|
||||||
+EXPORT_SYMBOL(fuse_flush_cache_page);
|
+EXPORT_SYMBOL(fuse_flush_cache_page);
|
||||||
+EXPORT_SYMBOL(fuse_flush_cache_all);
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--- a/arch/mips/bcm47xx/nvram.c
|
--- a/arch/mips/bcm47xx/nvram.c
|
||||||
+++ b/arch/mips/bcm47xx/nvram.c
|
+++ b/arch/mips/bcm47xx/nvram.c
|
||||||
@@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val,
|
@@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val,
|
||||||
return 1;
|
return -9;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nvram_getenv);
|
EXPORT_SYMBOL(nvram_getenv);
|
||||||
+
|
+
|
||||||
@ -33,7 +33,7 @@
|
|||||||
+EXPORT_SYMBOL(nvram_get);
|
+EXPORT_SYMBOL(nvram_get);
|
||||||
--- a/arch/mips/bcm47xx/setup.c
|
--- a/arch/mips/bcm47xx/setup.c
|
||||||
+++ b/arch/mips/bcm47xx/setup.c
|
+++ b/arch/mips/bcm47xx/setup.c
|
||||||
@@ -236,3 +236,20 @@ void __init plat_mem_setup(void)
|
@@ -238,3 +238,20 @@ void __init plat_mem_setup(void)
|
||||||
_machine_halt = bcm47xx_machine_halt;
|
_machine_halt = bcm47xx_machine_halt;
|
||||||
pm_power_off = bcm47xx_machine_halt;
|
pm_power_off = bcm47xx_machine_halt;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
+ if (tp->tg3_flags3 & TG3_FLG3_ROBOSWITCH) {
|
+ if (tp->tg3_flags3 & TG3_FLG3_ROBOSWITCH) {
|
||||||
+ current_link_up = 1;
|
+ current_link_up = 1;
|
||||||
+ current_speed = SPEED_1000; //FIXME
|
+ current_speed = SPEED_1000; /* FIXME */
|
||||||
+ current_duplex = DUPLEX_FULL;
|
+ current_duplex = DUPLEX_FULL;
|
||||||
+ tp->link_config.active_speed = current_speed;
|
+ tp->link_config.active_speed = current_speed;
|
||||||
+ tp->link_config.active_duplex = current_duplex;
|
+ tp->link_config.active_duplex = current_duplex;
|
||||||
|
@ -1,25 +1,28 @@
|
|||||||
--- a/arch/mips/include/asm/r4kcache.h
|
--- a/arch/mips/include/asm/r4kcache.h
|
||||||
+++ b/arch/mips/include/asm/r4kcache.h
|
+++ b/arch/mips/include/asm/r4kcache.h
|
||||||
@@ -20,10 +20,25 @@
|
@@ -20,10 +20,28 @@
|
||||||
#ifdef CONFIG_BCM47XX
|
#ifdef CONFIG_BCM47XX
|
||||||
#include <asm/paccess.h>
|
#include <asm/paccess.h>
|
||||||
#include <linux/ssb/ssb.h>
|
#include <linux/ssb/ssb.h>
|
||||||
-#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
|
-#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
|
||||||
+#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
|
+#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
|
||||||
+
|
+
|
||||||
+static inline unsigned long bcm4710_dummy_rreg(void) {
|
+static inline unsigned long bcm4710_dummy_rreg(void)
|
||||||
+ return (*(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE)));
|
+{
|
||||||
|
+ return *(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE));
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void *)(addr))
|
+#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void *)(addr))
|
||||||
+
|
+
|
||||||
+static inline unsigned long bcm4710_fill_tlb(void *addr) {
|
+static inline unsigned long bcm4710_fill_tlb(void *addr)
|
||||||
+ return (*(unsigned long *)addr);
|
+{
|
||||||
|
+ return *(unsigned long *)addr;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void *)(addr))
|
+#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void *)(addr))
|
||||||
+
|
+
|
||||||
+static inline void bcm4710_protected_fill_tlb(void *addr) {
|
+static inline void bcm4710_protected_fill_tlb(void *addr)
|
||||||
|
+{
|
||||||
+ unsigned long x;
|
+ unsigned long x;
|
||||||
+ get_dbe(x, (unsigned long *)addr);;
|
+ get_dbe(x, (unsigned long *)addr);;
|
||||||
+}
|
+}
|
||||||
|
@ -18,14 +18,15 @@
|
|||||||
unsigned long addr, unsigned long pfn)
|
unsigned long addr, unsigned long pfn)
|
||||||
{
|
{
|
||||||
struct flush_cache_page_args args;
|
struct flush_cache_page_args args;
|
||||||
@@ -1469,3 +1469,10 @@ void __cpuinit r4k_cache_init(void)
|
@@ -1469,3 +1469,11 @@ void __cpuinit r4k_cache_init(void)
|
||||||
coherency_setup();
|
coherency_setup();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+// fuse package DCACHE BUG patch exports
|
+/* fuse package DCACHE BUG patch exports */
|
||||||
+void (*fuse_flush_cache_all)(void) = r4k___flush_cache_all;
|
+void (*fuse_flush_cache_all)(void) = r4k___flush_cache_all;
|
||||||
|
+EXPORT_SYMBOL(fuse_flush_cache_all);
|
||||||
|
+
|
||||||
+void (*fuse_flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
|
+void (*fuse_flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
|
||||||
+ unsigned long pfn) = r4k_flush_cache_page;
|
+ unsigned long pfn) = r4k_flush_cache_page;
|
||||||
+EXPORT_SYMBOL(fuse_flush_cache_page);
|
+EXPORT_SYMBOL(fuse_flush_cache_page);
|
||||||
+EXPORT_SYMBOL(fuse_flush_cache_all);
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--- a/arch/mips/bcm47xx/nvram.c
|
--- a/arch/mips/bcm47xx/nvram.c
|
||||||
+++ b/arch/mips/bcm47xx/nvram.c
|
+++ b/arch/mips/bcm47xx/nvram.c
|
||||||
@@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val,
|
@@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val,
|
||||||
return 1;
|
return -1;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nvram_getenv);
|
EXPORT_SYMBOL(nvram_getenv);
|
||||||
+
|
+
|
||||||
@ -20,7 +20,8 @@
|
|||||||
+ end = nvram_buf + sizeof(nvram_buf) - 2;
|
+ end = nvram_buf + sizeof(nvram_buf) - 2;
|
||||||
+ end[0] = end[1] = '\0';
|
+ end[0] = end[1] = '\0';
|
||||||
+ for (; *var; var = value + strlen(value) + 1) {
|
+ for (; *var; var = value + strlen(value) + 1) {
|
||||||
+ if (!(eq = strchr(var, '=')))
|
+ eq = strchr(var, '=');
|
||||||
|
+ if (!eq)
|
||||||
+ break;
|
+ break;
|
||||||
+ value = eq + 1;
|
+ value = eq + 1;
|
||||||
+ if ((eq - var) == strlen(name) && strncmp(var, name, (eq - var)) == 0)
|
+ if ((eq - var) == strlen(name) && strncmp(var, name, (eq - var)) == 0)
|
||||||
@ -29,11 +30,10 @@
|
|||||||
+
|
+
|
||||||
+ return NULL;
|
+ return NULL;
|
||||||
+}
|
+}
|
||||||
+
|
|
||||||
+EXPORT_SYMBOL(nvram_get);
|
+EXPORT_SYMBOL(nvram_get);
|
||||||
--- a/arch/mips/bcm47xx/setup.c
|
--- a/arch/mips/bcm47xx/setup.c
|
||||||
+++ b/arch/mips/bcm47xx/setup.c
|
+++ b/arch/mips/bcm47xx/setup.c
|
||||||
@@ -236,3 +236,20 @@ void __init plat_mem_setup(void)
|
@@ -238,3 +238,20 @@ void __init plat_mem_setup(void)
|
||||||
_machine_halt = bcm47xx_machine_halt;
|
_machine_halt = bcm47xx_machine_halt;
|
||||||
pm_power_off = bcm47xx_machine_halt;
|
pm_power_off = bcm47xx_machine_halt;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
+ if (tp->tg3_flags3 & TG3_FLG3_ROBOSWITCH) {
|
+ if (tp->tg3_flags3 & TG3_FLG3_ROBOSWITCH) {
|
||||||
+ current_link_up = 1;
|
+ current_link_up = 1;
|
||||||
+ current_speed = SPEED_1000; //FIXME
|
+ current_speed = SPEED_1000; /* FIXME */
|
||||||
+ current_duplex = DUPLEX_FULL;
|
+ current_duplex = DUPLEX_FULL;
|
||||||
+ tp->link_config.active_speed = current_speed;
|
+ tp->link_config.active_speed = current_speed;
|
||||||
+ tp->link_config.active_duplex = current_duplex;
|
+ tp->link_config.active_duplex = current_duplex;
|
||||||
|
@ -1,25 +1,28 @@
|
|||||||
--- a/arch/mips/include/asm/r4kcache.h
|
--- a/arch/mips/include/asm/r4kcache.h
|
||||||
+++ b/arch/mips/include/asm/r4kcache.h
|
+++ b/arch/mips/include/asm/r4kcache.h
|
||||||
@@ -20,10 +20,25 @@
|
@@ -20,10 +20,28 @@
|
||||||
#ifdef CONFIG_BCM47XX
|
#ifdef CONFIG_BCM47XX
|
||||||
#include <asm/paccess.h>
|
#include <asm/paccess.h>
|
||||||
#include <linux/ssb/ssb.h>
|
#include <linux/ssb/ssb.h>
|
||||||
-#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
|
-#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
|
||||||
+#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
|
+#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
|
||||||
+
|
+
|
||||||
+static inline unsigned long bcm4710_dummy_rreg(void) {
|
+static inline unsigned long bcm4710_dummy_rreg(void)
|
||||||
+ return (*(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE)));
|
+{
|
||||||
|
+ return *(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE));
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void *)(addr))
|
+#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void *)(addr))
|
||||||
+
|
+
|
||||||
+static inline unsigned long bcm4710_fill_tlb(void *addr) {
|
+static inline unsigned long bcm4710_fill_tlb(void *addr)
|
||||||
+ return (*(unsigned long *)addr);
|
+{
|
||||||
|
+ return *(unsigned long *)addr;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void *)(addr))
|
+#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void *)(addr))
|
||||||
+
|
+
|
||||||
+static inline void bcm4710_protected_fill_tlb(void *addr) {
|
+static inline void bcm4710_protected_fill_tlb(void *addr)
|
||||||
|
+{
|
||||||
+ unsigned long x;
|
+ unsigned long x;
|
||||||
+ get_dbe(x, (unsigned long *)addr);;
|
+ get_dbe(x, (unsigned long *)addr);;
|
||||||
+}
|
+}
|
||||||
|
Loading…
Reference in New Issue
Block a user