aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx/patches-3.14/110-bcm47xx-move-the-nvram-header-file-into-common-space.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2014-08-24 15:57:49 +0000
committerHauke Mehrtens <hauke@openwrt.org>2014-08-24 15:57:49 +0000
commit49a8887214b5369e55b356a18e426d8abc8a182f (patch)
tree58e63ca7fba300db8872b0e0abaa2d0759a382f3 /target/linux/bcm53xx/patches-3.14/110-bcm47xx-move-the-nvram-header-file-into-common-space.patch
parent7bbfb59996f12d39d8eeda0bf62e1f9f839e9f8e (diff)
downloadmaster-187ad058-49a8887214b5369e55b356a18e426d8abc8a182f.tar.gz
master-187ad058-49a8887214b5369e55b356a18e426d8abc8a182f.tar.bz2
master-187ad058-49a8887214b5369e55b356a18e426d8abc8a182f.zip
bcm53xx: update bcma device tree intergeneration and fix nvram parsing
This fixes lots of sparse and checkpatch errors and extends the documentation. This also fixes a problem in the nvram parser, it now detects the correct nvram on my Netgear R6250. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42272 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/bcm53xx/patches-3.14/110-bcm47xx-move-the-nvram-header-file-into-common-space.patch')
-rw-r--r--target/linux/bcm53xx/patches-3.14/110-bcm47xx-move-the-nvram-header-file-into-common-space.patch31
1 files changed, 20 insertions, 11 deletions
diff --git a/target/linux/bcm53xx/patches-3.14/110-bcm47xx-move-the-nvram-header-file-into-common-space.patch b/target/linux/bcm53xx/patches-3.14/110-bcm47xx-move-the-nvram-header-file-into-common-space.patch
index 85b9ab38bd..773ee4612a 100644
--- a/target/linux/bcm53xx/patches-3.14/110-bcm47xx-move-the-nvram-header-file-into-common-space.patch
+++ b/target/linux/bcm53xx/patches-3.14/110-bcm47xx-move-the-nvram-header-file-into-common-space.patch
@@ -1,24 +1,32 @@
-From bd489dfe8c0d7495645cbc8b8c283217ba816fab Mon Sep 17 00:00:00 2001
+From 7063a1583166abe1a9cefed38c2f53a0e14a0005 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 4 May 2014 16:35:42 +0200
-Subject: [PATCH 02/15] bcm47xx: move the nvram header file into common space
+Subject: [PATCH 01/17] MIPS: BCM47XX: move the nvram header file into common
+ space
-Moving mach-bcm47xx/bcm47xx_nvram.h makes it possible to reuse this
-header on the arm bcm47xx (BCM5301X) devices. This way a driver gets
-the correct functions to access the nvram depending on the SoC it boots
-for.
+Moving mach-bcm47xx/bcm47xx_nvram.h to include/linux/bcm47xx_nvram.h
+makes it possible to reuse this header on the ARM based bcm47xx/bcm53xx
+SoCs (e.g. BCM5301X devices). Broadcom uses ARM CPUs in their new SoC
+form the bcm47xx and bcm53xx line, but many other things like nvram
+stayed the same.
+
+This is a preparation for adding a new nvram driver, which can be used
+by the ARM SoC and the MIPS SoC code. The device drivers accessing
+nvram do not have to care about ARM or MIPS SoC version.
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/board.c | 2 +-
arch/mips/bcm47xx/nvram.c | 2 +-
arch/mips/bcm47xx/setup.c | 2 +-
arch/mips/bcm47xx/sprom.c | 2 +-
arch/mips/bcm47xx/time.c | 2 +-
- arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h | 53 ------------------
+ arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h | 53 -----------------
drivers/net/ethernet/broadcom/b44.c | 8 +--
drivers/net/ethernet/broadcom/bgmac.c | 2 +-
drivers/ssb/driver_chipcommon_pmu.c | 6 +-
- include/linux/bcm47xx_nvram.h | 65 ++++++++++++++++++++++
- 10 files changed, 73 insertions(+), 71 deletions(-)
+ include/linux/bcm47xx_nvram.h | 66 ++++++++++++++++++++++
+ 10 files changed, 74 insertions(+), 71 deletions(-)
delete mode 100644 arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h
create mode 100644 include/linux/bcm47xx_nvram.h
@@ -202,7 +210,7 @@ for.
switch (bus->chip_id) {
--- /dev/null
+++ b/include/linux/bcm47xx_nvram.h
-@@ -0,0 +1,65 @@
+@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2005, Broadcom Corporation
+ * Copyright (C) 2006, Felix Fietkau <nbd@openwrt.org>
@@ -243,7 +251,8 @@ for.
+
+int bcm47xx_nvram_gpio_pin(const char *name);
+#else
-+static inline int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len)
++static inline int bcm47xx_nvram_getenv(const char *name, char *val,
++ size_t val_len)
+{
+ return -ENXIO;
+}