Skip to contentSkip to conversation

ssb: drop BROKEN from SSB_SFLASH

PATCH In review Rafał Miłecki 3 participants 3 messages Jun 25, 2013 – Jul 24, 2013 Sonics silicon backplane driver (ssb)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ssb: drop BROKEN from SSB_SFLASH

With recent patches ssb can fetch info about serial flash and register it as a platform device. No more reasons to mark it BROKEN.

---
Hauke: does it look OK for you? Did you give it a try?

---
 drivers/ssb/Kconfig                    |    2 +-
 drivers/ssb/driver_chipcommon_sflash.c |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/ssb/Kconfig +1 -1
index 4f0dd37..775251d 100644
@@ -139,7 +139,7 @@ config SSB_DRIVER_MIPS
 
 config SSB_SFLASH
 	bool "SSB serial flash support"
-	depends on SSB_DRIVER_MIPS && BROKEN
+	depends on SSB_DRIVER_MIPS
 	default y
 
 # Assumption: We are on embedded, if we compile the MIPS core.
drivers/ssb/driver_chipcommon_sflash.c +3 -5
index e84cf04..50328de 100644
@@ -151,8 +151,8 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
 	sflash->size = sflash->blocksize * sflash->numblocks;
 	sflash->present = true;
 
-	pr_info("Found %s serial flash (blocksize: 0x%X, blocks: %d)\n",
-		e->name, e->blocksize, e->numblocks);
+	pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n",
+		e->name, sflash->size / 1024, e->blocksize, e->numblocks);
 
 	/* Prepare platform device, but don't register it yet. It's too early,
 	 * malloc (required by device_private_init) is not available yet. */
@@ -160,7 +160,5 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
 					 sflash->size;
 	ssb_sflash_dev.dev.platform_data = sflash;
 
-	pr_err("Serial flash support is not implemented yet!\n");
-
-	return -ENOTSUPP;
+	return 0;
 }
Signature · 1 line
1.7.10.4
#1 lore raw

Did Hauke respond to this?

Quoted 53 lines · Rafał Miłecki

With recent patches ssb can fetch info about serial flash and register it as a platform device. No more reasons to mark it BROKEN.

---
Hauke: does it look OK for you? Did you give it a try?

---
 drivers/ssb/Kconfig                    |    2 +-
 drivers/ssb/driver_chipcommon_sflash.c |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/ssb/Kconfig +1 -1
index 4f0dd37..775251d 100644
@@ -139,7 +139,7 @@ config SSB_DRIVER_MIPS
 
 config SSB_SFLASH
 	bool "SSB serial flash support"
-	depends on SSB_DRIVER_MIPS && BROKEN
+	depends on SSB_DRIVER_MIPS
 	default y
 
 # Assumption: We are on embedded, if we compile the MIPS core.
drivers/ssb/driver_chipcommon_sflash.c +3 -5
index e84cf04..50328de 100644
@@ -151,8 +151,8 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
 	sflash->size = sflash->blocksize * sflash->numblocks;
 	sflash->present = true;
 
-	pr_info("Found %s serial flash (blocksize: 0x%X, blocks: %d)\n",
-		e->name, e->blocksize, e->numblocks);
+	pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n",
+		e->name, sflash->size / 1024, e->blocksize, e->numblocks);
 
 	/* Prepare platform device, but don't register it yet. It's too early,
 	 * malloc (required by device_private_init) is not available yet. */
@@ -160,7 +160,5 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
 					 sflash->size;
 	ssb_sflash_dev.dev.platform_data = sflash;
 
-	pr_err("Serial flash support is not implemented yet!\n");
-
-	return -ENOTSUPP;
+	return 0;
 }
Signature · 1 line
1.7.10.4
Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#2 lore raw
Quoted 47 lines · John W. Linville

Did Hauke respond to this?

Quoted 44 lines · Rafał Miłecki

With recent patches ssb can fetch info about serial flash and register it as a platform device. No more reasons to mark it BROKEN.

---
Hauke: does it look OK for you? Did you give it a try?

---
 drivers/ssb/Kconfig                    |    2 +-
 drivers/ssb/driver_chipcommon_sflash.c |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/ssb/Kconfig +1 -1
index 4f0dd37..775251d 100644
@@ -139,7 +139,7 @@ config SSB_DRIVER_MIPS
 
 config SSB_SFLASH
 	bool "SSB serial flash support"
-	depends on SSB_DRIVER_MIPS && BROKEN
+	depends on SSB_DRIVER_MIPS
 	default y
 
 # Assumption: We are on embedded, if we compile the MIPS core.
drivers/ssb/driver_chipcommon_sflash.c +2 -2
index e84cf04..50328de 100644
@@ -151,8 +151,8 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
 	sflash->size = sflash->blocksize * sflash->numblocks;
 	sflash->present = true;
 
-	pr_info("Found %s serial flash (blocksize: 0x%X, blocks: %d)\n",
-		e->name, e->blocksize, e->numblocks);
+	pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n",
+		e->name, sflash->size / 1024, e->blocksize, e->numblocks);
 
 	/* Prepare platform device, but don't register it yet. It's too early,
 	 * malloc (required by device_private_init) is not available yet. */
@@ -160,7 +160,5 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
 					 sflash->size;
 	ssb_sflash_dev.dev.platform_data = sflash;
 
Quoted 5 lines

drivers/ssb/driver_chipcommon_sflash.c int ssb_sflash_init(struct ssb_chipcommon *cc) · line 164

Quoted 5 lines
drivers/ssb/driver_chipcommon_sflash.c +1 -3
-	pr_err("Serial flash support is not implemented yet!\n");
-
-	return -ENOTSUPP;
+	return 0;
 }

Hi,

I do not own a device with a serial flash chip connected to ssb. This patch looks ok to me, please apply it.

Hauke