linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ssb: drop BROKEN from SSB_SFLASH
@ 2013-06-25  8:13 Rafał Miłecki
  2013-07-24 14:55 ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Rafał Miłecki @ 2013-06-25  8:13 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: Hauke Mehrtens, 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.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
---
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(-)

diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
index 4f0dd37..775251d 100644
--- a/drivers/ssb/Kconfig
+++ b/drivers/ssb/Kconfig
@@ -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.
diff --git a/drivers/ssb/driver_chipcommon_sflash.c b/drivers/ssb/driver_chipcommon_sflash.c
index e84cf04..50328de 100644
--- a/drivers/ssb/driver_chipcommon_sflash.c
+++ b/drivers/ssb/driver_chipcommon_sflash.c
@@ -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;
 }
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ssb: drop BROKEN from SSB_SFLASH
  2013-06-25  8:13 [PATCH] ssb: drop BROKEN from SSB_SFLASH Rafał Miłecki
@ 2013-07-24 14:55 ` John W. Linville
  2013-07-24 15:04   ` Hauke Mehrtens
  0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2013-07-24 14:55 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: linux-wireless, Hauke Mehrtens

Did Hauke respond to this?

On Tue, Jun 25, 2013 at 10:13:46AM +0200, Rafał Miłecki wrote:
> With recent patches ssb can fetch info about serial flash and register
> it as a platform device. No more reasons to mark it BROKEN.
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> Cc: Hauke Mehrtens <hauke@hauke-m.de>
> ---
> 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(-)
> 
> diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
> index 4f0dd37..775251d 100644
> --- a/drivers/ssb/Kconfig
> +++ b/drivers/ssb/Kconfig
> @@ -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.
> diff --git a/drivers/ssb/driver_chipcommon_sflash.c b/drivers/ssb/driver_chipcommon_sflash.c
> index e84cf04..50328de 100644
> --- a/drivers/ssb/driver_chipcommon_sflash.c
> +++ b/drivers/ssb/driver_chipcommon_sflash.c
> @@ -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;
>  }
> -- 
> 1.7.10.4
> 
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ssb: drop BROKEN from SSB_SFLASH
  2013-07-24 14:55 ` John W. Linville
@ 2013-07-24 15:04   ` Hauke Mehrtens
  0 siblings, 0 replies; 3+ messages in thread
From: Hauke Mehrtens @ 2013-07-24 15:04 UTC (permalink / raw)
  To: John W. Linville; +Cc: Rafał Miłecki, linux-wireless

On 07/24/2013 04:55 PM, John W. Linville wrote:
> Did Hauke respond to this?
> 
> On Tue, Jun 25, 2013 at 10:13:46AM +0200, Rafał Miłecki wrote:
>> With recent patches ssb can fetch info about serial flash and register
>> it as a platform device. No more reasons to mark it BROKEN.
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>> Cc: Hauke Mehrtens <hauke@hauke-m.de>
>> ---
>> 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(-)
>>
>> diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
>> index 4f0dd37..775251d 100644
>> --- a/drivers/ssb/Kconfig
>> +++ b/drivers/ssb/Kconfig
>> @@ -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.
>> diff --git a/drivers/ssb/driver_chipcommon_sflash.c b/drivers/ssb/driver_chipcommon_sflash.c
>> index e84cf04..50328de 100644
>> --- a/drivers/ssb/driver_chipcommon_sflash.c
>> +++ b/drivers/ssb/driver_chipcommon_sflash.c
>> @@ -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;
>>  }

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-24 15:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25  8:13 [PATCH] ssb: drop BROKEN from SSB_SFLASH Rafał Miłecki
2013-07-24 14:55 ` John W. Linville
2013-07-24 15:04   ` Hauke Mehrtens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).