aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/bcm63xx/nvram.c11
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/bcm63xx/nvram.c b/arch/mips/bcm63xx/nvram.c
index e652e578a679..4b50d40f7451 100644
--- a/arch/mips/bcm63xx/nvram.c
+++ b/arch/mips/bcm63xx/nvram.c
@@ -35,6 +35,8 @@ struct bcm963xx_nvram {
35 u32 checksum_high; 35 u32 checksum_high;
36}; 36};
37 37
38#define BCM63XX_DEFAULT_PSI_SIZE 64
39
38static struct bcm963xx_nvram nvram; 40static struct bcm963xx_nvram nvram;
39static int mac_addr_used; 41static int mac_addr_used;
40 42
@@ -114,3 +116,12 @@ int bcm63xx_nvram_get_mac_address(u8 *mac)
114 return 0; 116 return 0;
115} 117}
116EXPORT_SYMBOL(bcm63xx_nvram_get_mac_address); 118EXPORT_SYMBOL(bcm63xx_nvram_get_mac_address);
119
120int bcm63xx_nvram_get_psi_size(void)
121{
122 if (nvram.psi_size > 0)
123 return nvram.psi_size;
124
125 return BCM63XX_DEFAULT_PSI_SIZE;
126}
127EXPORT_SYMBOL(bcm63xx_nvram_get_psi_size);
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
index 4e0b6bc1165e..348df49dcc9f 100644
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
@@ -30,4 +30,6 @@ u8 *bcm63xx_nvram_get_name(void);
30 */ 30 */
31int bcm63xx_nvram_get_mac_address(u8 *mac); 31int bcm63xx_nvram_get_mac_address(u8 *mac);
32 32
33int bcm63xx_nvram_get_psi_size(void);
34
33#endif /* BCM63XX_NVRAM_H */ 35#endif /* BCM63XX_NVRAM_H */