Re: [PATCH 2/8] intel_mid_ssp_spi: Re-introduce quirks fields

2011-02-14 Thread Grant Likely
On Wed, Feb 09, 2011 at 10:07:30AM +, Alan Cox wrote:
 From: Alan Cox a...@linux.intel.com
 
 This adds the quirks field to the driver and the flags. We don't yet
 implement any of them so we don't confuse the driver.
 
 Signed-off-by: Alan Cox a...@linux.intel.com

Other than minor point, looks fine.  Looks like it should be squashed
into patch #1.

g.

 ---
 
  drivers/spi/intel_mid_ssp_spi.c |   11 ++-
  1 files changed, 10 insertions(+), 1 deletions(-)
 
 
 diff --git a/drivers/spi/intel_mid_ssp_spi.c b/drivers/spi/intel_mid_ssp_spi.c
 index 19c62bc..f201edd 100644
 --- a/drivers/spi/intel_mid_ssp_spi.c
 +++ b/drivers/spi/intel_mid_ssp_spi.c
 @@ -125,6 +125,15 @@ struct driver_data {
   /* SPI framework hookup */
   struct spi_master *master;
  
 + /* Chip specific quirks */
 + int quirks;
 +#define QUIRKS_PLATFORM_MRST 1
 +#define QUIRKS_SRAM_ADDITIONAL_CPY   2
 +#define QUIRKS_USE_PM_QOS4
 +#define QUIRKS_BIT_BANGING   8
 +#define QUIRKS_SPI_SLAVE_CLOCK_MODE  16
 +#define QUIRKS_PLATFORM_MDFL 32
 +
   /* SSP register addresses */
   unsigned long paddr;
   void __iomem *ioaddr;
 @@ -137,7 +146,6 @@ struct driver_data {
   u32 clear_sr;
   u32 mask_sr;
  
 -

unrelated whitespace change.

   /* Current message transfer state info */
   struct tasklet_struct poll_transfer;
   struct spi_message *cur_msg;
 @@ -1163,6 +1171,7 @@ static int intel_mid_ssp_spi_probe(struct pci_dev *pdev,
   }
  
   drv_data = spi_master_get_devdata(master);
 + drv_data-quirks = ent-driver_data;
   drv_data-master = master;
   drv_data-pdev = pdev;
   drv_data-pwrstate = PWRSTATE_ON;
 

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH 2/8] intel_mid_ssp_spi: Re-introduce quirks fields

2011-02-09 Thread Alan Cox
From: Alan Cox a...@linux.intel.com

This adds the quirks field to the driver and the flags. We don't yet
implement any of them so we don't confuse the driver.

Signed-off-by: Alan Cox a...@linux.intel.com
---

 drivers/spi/intel_mid_ssp_spi.c |   11 ++-
 1 files changed, 10 insertions(+), 1 deletions(-)


diff --git a/drivers/spi/intel_mid_ssp_spi.c b/drivers/spi/intel_mid_ssp_spi.c
index 19c62bc..f201edd 100644
--- a/drivers/spi/intel_mid_ssp_spi.c
+++ b/drivers/spi/intel_mid_ssp_spi.c
@@ -125,6 +125,15 @@ struct driver_data {
/* SPI framework hookup */
struct spi_master *master;
 
+   /* Chip specific quirks */
+   int quirks;
+#define QUIRKS_PLATFORM_MRST   1
+#define QUIRKS_SRAM_ADDITIONAL_CPY 2
+#define QUIRKS_USE_PM_QOS  4
+#define QUIRKS_BIT_BANGING 8
+#define QUIRKS_SPI_SLAVE_CLOCK_MODE16
+#define QUIRKS_PLATFORM_MDFL   32
+
/* SSP register addresses */
unsigned long paddr;
void __iomem *ioaddr;
@@ -137,7 +146,6 @@ struct driver_data {
u32 clear_sr;
u32 mask_sr;
 
-
/* Current message transfer state info */
struct tasklet_struct poll_transfer;
struct spi_message *cur_msg;
@@ -1163,6 +1171,7 @@ static int intel_mid_ssp_spi_probe(struct pci_dev *pdev,
}
 
drv_data = spi_master_get_devdata(master);
+   drv_data-quirks = ent-driver_data;
drv_data-master = master;
drv_data-pdev = pdev;
drv_data-pwrstate = PWRSTATE_ON;


--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general