mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 14:34:27 -05:00 
			
		
		
		
	Boot tested on Comtrend AR-5387un: https://gist.github.com/Noltari/57e5030455da8dc38e61f8c3a5922254 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> [jonas.gorski: make 4.19 an optional testing version; add gcc 8.3 fix] Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
		
			
				
	
	
		
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
From 89cd5efa4a0d342b860a726bb1d382e4db4b96a4 Mon Sep 17 00:00:00 2001
 | 
						|
From: Jonas Gorski <jonas.gorski@gmail.com>
 | 
						|
Date: Wed, 28 Jun 2017 18:34:42 +0200
 | 
						|
Subject: [PATCH 1/2] mtd: bcm63xxpart: add of_match_table
 | 
						|
 | 
						|
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
 | 
						|
---
 | 
						|
 drivers/mtd/bcm63xxpart.c | 8 ++++++++
 | 
						|
 1 file changed, 8 insertions(+)
 | 
						|
 | 
						|
--- a/drivers/mtd/bcm63xxpart.c
 | 
						|
+++ b/drivers/mtd/bcm63xxpart.c
 | 
						|
@@ -34,6 +34,7 @@
 | 
						|
 #include <linux/vmalloc.h>
 | 
						|
 #include <linux/mtd/mtd.h>
 | 
						|
 #include <linux/mtd/partitions.h>
 | 
						|
+#include <linux/of.h>
 | 
						|
 
 | 
						|
 #define BCM963XX_CFE_BLOCK_SIZE		SZ_64K	/* always at least 64KiB */
 | 
						|
 
 | 
						|
@@ -172,9 +173,16 @@ out:
 | 
						|
 	return ret;
 | 
						|
 };
 | 
						|
 
 | 
						|
+static const struct of_device_id parse_bcm63xx_cfe_match_table[] = {
 | 
						|
+	{ .compatible = "brcm,bcm963xx-cfe-nor-partitions" },
 | 
						|
+	{},
 | 
						|
+};
 | 
						|
+MODULE_DEVICE_TABLE(of, parse_bcm63xx_cfe_match_table);
 | 
						|
+
 | 
						|
 static struct mtd_part_parser bcm63xx_cfe_parser = {
 | 
						|
 	.parse_fn = bcm63xx_parse_cfe_partitions,
 | 
						|
 	.name = "bcm63xxpart",
 | 
						|
+	.of_match_table = parse_bcm63xx_cfe_match_table,
 | 
						|
 };
 | 
						|
 module_mtd_part_parser(bcm63xx_cfe_parser);
 | 
						|
 
 |