From: Simon Arlott <simon-A6De1vDTPLDsq35pWSNszA@public.gmane.org>
To: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Brian Norris
<computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Florian Fainelli
<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>,
Kevin Cernekee <cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
MTD Maling List
<linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
Jonas Gorski <jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>,
bcm-kernel-feedback-list
<bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
MIPS Mailing List
<linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH linux-next (v2) 1/3] MIPS: bcm963xx: Add nvram structure
Date: Thu, 10 Dec 2015 23:04:27 +0000 [thread overview]
Message-ID: <566A04FB.7000104@simon.arlott.org.uk> (raw)
The BCM963xx has multiple nvram variants across different SoCs with
additional checksum fields added whenever the size of the nvram was
extended.
Signed-off-by: Simon Arlott <simon-A6De1vDTPLDsq35pWSNszA@public.gmane.org>
---
v2: Use external struct bcm963xx_nvram definition for bcm963268part.
MAINTAINERS | 1 +
include/uapi/linux/bcm963xx_nvram.h | 39 +++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 include/uapi/linux/bcm963xx_nvram.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 1354720..5d2272c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2396,6 +2396,7 @@ F: drivers/irqchip/irq-brcmstb*
F: drivers/power/bcm6358*
F: drivers/reset/bcm/reset-bcm6345*
F: include/linux/bcm63xx_wdt.h
+F: include/uapi/linux/bcm963xx_nvram.h
BROADCOM TG3 GIGABIT ETHERNET DRIVER
M: Prashant Sreedharan <prashant-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
diff --git a/include/uapi/linux/bcm963xx_nvram.h b/include/uapi/linux/bcm963xx_nvram.h
new file mode 100644
index 0000000..470a4b9
--- /dev/null
+++ b/include/uapi/linux/bcm963xx_nvram.h
@@ -0,0 +1,39 @@
+#ifndef _UAPI__LINUX_BCM963XX_NVRAM_H__
+#define _UAPI__LINUX_BCM963XX_NVRAM_H__
+
+#include <linux/sizes.h>
+#include <linux/types.h>
+#include <linux/if_ether.h>
+
+#define BCM963XX_NVRAM_V4_SIZE 300
+#define BCM963XX_NVRAM_V5_SIZE (1 * SZ_1K)
+#define BCM963XX_NVRAM_V6_SIZE BCM963XX_NVRAM_V5_SIZE
+#define BCM963XX_NVRAM_V7_SIZE (3 * SZ_1K)
+
+#define BCM963XX_NVRAM_NR_PARTS 5
+
+struct bcm963xx_nvram {
+ u32 version;
+ char bootline[256];
+ char name[16];
+ u32 main_tp_number;
+ u32 psi_size;
+ u32 mac_addr_count;
+ u8 mac_addr_base[ETH_ALEN];
+ u8 __reserved1[2];
+ u32 checksum_v4;
+
+ u8 __reserved2[292];
+ u32 nand_part_offset[BCM963XX_NVRAM_NR_PARTS];
+ u32 nand_part_size[BCM963XX_NVRAM_NR_PARTS];
+ u8 __reserved3[388];
+ union {
+ u32 checksum_v5;
+ u32 checksum_v6;
+ };
+
+ u8 __reserved4[2044];
+ u32 checksum_v7;
+} __packed;
+
+#endif /* _UAPI__LINUX_BCM963XX_NVRAM_H__ */
--
2.1.4
--
Simon Arlott
WARNING: multiple messages have this Message-ID (diff)
From: Simon Arlott <simon@fire.lp0.eu>
To: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Ralf Baechle <ralf@linux-mips.org>,
Kevin Cernekee <cernekee@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
MTD Maling List <linux-mtd@lists.infradead.org>,
Jonas Gorski <jogo@openwrt.org>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
MIPS Mailing List <linux-mips@linux-mips.org>,
linux-api@vger.kernel.org
Subject: [PATCH linux-next (v2) 1/3] MIPS: bcm963xx: Add nvram structure
Date: Thu, 10 Dec 2015 23:04:27 +0000 [thread overview]
Message-ID: <566A04FB.7000104@simon.arlott.org.uk> (raw)
The BCM963xx has multiple nvram variants across different SoCs with
additional checksum fields added whenever the size of the nvram was
extended.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
---
v2: Use external struct bcm963xx_nvram definition for bcm963268part.
MAINTAINERS | 1 +
include/uapi/linux/bcm963xx_nvram.h | 39 +++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 include/uapi/linux/bcm963xx_nvram.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 1354720..5d2272c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2396,6 +2396,7 @@ F: drivers/irqchip/irq-brcmstb*
F: drivers/power/bcm6358*
F: drivers/reset/bcm/reset-bcm6345*
F: include/linux/bcm63xx_wdt.h
+F: include/uapi/linux/bcm963xx_nvram.h
BROADCOM TG3 GIGABIT ETHERNET DRIVER
M: Prashant Sreedharan <prashant@broadcom.com>
diff --git a/include/uapi/linux/bcm963xx_nvram.h b/include/uapi/linux/bcm963xx_nvram.h
new file mode 100644
index 0000000..470a4b9
--- /dev/null
+++ b/include/uapi/linux/bcm963xx_nvram.h
@@ -0,0 +1,39 @@
+#ifndef _UAPI__LINUX_BCM963XX_NVRAM_H__
+#define _UAPI__LINUX_BCM963XX_NVRAM_H__
+
+#include <linux/sizes.h>
+#include <linux/types.h>
+#include <linux/if_ether.h>
+
+#define BCM963XX_NVRAM_V4_SIZE 300
+#define BCM963XX_NVRAM_V5_SIZE (1 * SZ_1K)
+#define BCM963XX_NVRAM_V6_SIZE BCM963XX_NVRAM_V5_SIZE
+#define BCM963XX_NVRAM_V7_SIZE (3 * SZ_1K)
+
+#define BCM963XX_NVRAM_NR_PARTS 5
+
+struct bcm963xx_nvram {
+ u32 version;
+ char bootline[256];
+ char name[16];
+ u32 main_tp_number;
+ u32 psi_size;
+ u32 mac_addr_count;
+ u8 mac_addr_base[ETH_ALEN];
+ u8 __reserved1[2];
+ u32 checksum_v4;
+
+ u8 __reserved2[292];
+ u32 nand_part_offset[BCM963XX_NVRAM_NR_PARTS];
+ u32 nand_part_size[BCM963XX_NVRAM_NR_PARTS];
+ u8 __reserved3[388];
+ union {
+ u32 checksum_v5;
+ u32 checksum_v6;
+ };
+
+ u8 __reserved4[2044];
+ u32 checksum_v7;
+} __packed;
+
+#endif /* _UAPI__LINUX_BCM963XX_NVRAM_H__ */
--
2.1.4
--
Simon Arlott
next reply other threads:[~2015-12-10 23:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 23:04 Simon Arlott [this message]
2015-12-10 23:04 ` [PATCH linux-next (v2) 1/3] MIPS: bcm963xx: Add nvram structure Simon Arlott
[not found] ` <566A04FB.7000104-qdVf85lJwsCyrPCCpiK2c/XRex20P6io@public.gmane.org>
2015-12-10 23:06 ` [PATCH linux-next (v2) 2/3] MIPS: bcm63xx: Use common nvram structure definition Simon Arlott
2015-12-10 23:06 ` Simon Arlott
2015-12-10 23:10 ` [PATCH linux-next (v2) 3/3] mtd: part: Add BCM962368 CFE partitioning support Simon Arlott
2015-12-10 23:10 ` Simon Arlott
[not found] ` <566A0655.5080606-qdVf85lJwsCyrPCCpiK2c/XRex20P6io@public.gmane.org>
2015-12-11 0:05 ` Brian Norris
2015-12-11 0:05 ` Brian Norris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=566A04FB.7000104@simon.arlott.org.uk \
--to=simon-a6de1vdtpldsq35pwsnsza@public.gmane.org \
--cc=bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
--cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.