mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
update brcm-2.4 to 2.4.35.4, integrate new broadcom system code, update broadcom-wl to a contributed version (v4.150.10.5) - no bcm57xx support yet, will follow shortly
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10137 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include <osl.h>
|
||||
#include <bcmendian.h>
|
||||
#include <bcmnvram.h>
|
||||
#include <bcmutils.h>
|
||||
#include <sbconfig.h>
|
||||
#include <sbchipc.h>
|
||||
#include <sbutils.h>
|
||||
@@ -53,6 +52,9 @@ static char nvram_buf[NVRAM_SPACE] __attribute__((aligned(PAGE_SIZE)));
|
||||
extern void *bcm947xx_sbh;
|
||||
extern spinlock_t bcm947xx_sbh_lock;
|
||||
|
||||
static int cfe_env;
|
||||
extern char *cfe_env_get(char *nv_buf, const char *name);
|
||||
|
||||
/* Convenience */
|
||||
#define sbh bcm947xx_sbh
|
||||
#define sbh_lock bcm947xx_sbh_lock
|
||||
@@ -72,14 +74,14 @@ early_nvram_init(void)
|
||||
|
||||
if ((cc = sb_setcore(sbh, SB_CC, 0)) != NULL) {
|
||||
base = KSEG1ADDR(SB_FLASH2);
|
||||
switch (readl(&cc->capabilities) & CAP_FLASH_MASK) {
|
||||
switch (readl(&cc->capabilities) & CC_CAP_FLASH_MASK) {
|
||||
case PFLASH:
|
||||
lim = SB_FLASH2_SZ;
|
||||
break;
|
||||
|
||||
case SFLASH_ST:
|
||||
case SFLASH_AT:
|
||||
if ((info = sflash_init(cc)) == NULL)
|
||||
if ((info = sflash_init(sbh,cc)) == NULL)
|
||||
return;
|
||||
lim = info->size;
|
||||
break;
|
||||
@@ -105,6 +107,7 @@ early_nvram_init(void)
|
||||
break;
|
||||
*dst++ = *src++;
|
||||
}
|
||||
cfe_env = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -154,6 +157,9 @@ early_nvram_get(const char *name)
|
||||
if (!nvram_buf[0])
|
||||
early_nvram_init();
|
||||
|
||||
if (cfe_env)
|
||||
return cfe_env_get(nvram_buf, name);
|
||||
|
||||
/* Look for name=value and return value */
|
||||
var = &nvram_buf[sizeof(struct nvram_header)];
|
||||
end = nvram_buf + sizeof(nvram_buf) - 2;
|
||||
|
||||
Reference in New Issue
Block a user