Changeset 32736


Ignore:
Timestamp:
2012-07-15T19:52:48+02:00 (6 years ago)
Author:
juhosg
Message:

ar71xx: use gpio_set_value_cansleep on sleeping GPIOs in ath79_spi

Location:
trunk/target/linux/ar71xx/patches-3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/patches-3.3/206-spi-ath79-make-chipselect-logic-more-flexible.patch

    r32607 r32736  
    179179        if (is_active) { 
    180180                /* set initial clock polarity */ 
    181 @@ -80,20 +83,21 @@ static void ath79_spi_chipselect(struct 
     181@@ -80,20 +83,24 @@ static void ath79_spi_chipselect(struct 
    182182                ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base); 
    183183        } 
     
    204204+       case ATH79_SPI_CS_TYPE_GPIO: 
    205205+               /* SPI is normally active-low */ 
    206 +               gpio_set_value(cdata->cs_line, cs_high); 
     206+               if (gpio_cansleep(cdata->cs_line)) 
     207+                       gpio_set_value_cansleep(cdata->cs_line, cs_high); 
     208+               else 
     209+                       gpio_set_value(cdata->cs_line, cs_high); 
    207210+               break; 
    208211+       } 
     
    210213  
    211214 static void ath79_spi_enable(struct ath79_spi *sp) 
    212 @@ -120,24 +124,30 @@ static void ath79_spi_disable(struct ath 
     215@@ -120,24 +127,30 @@ static void ath79_spi_disable(struct ath 
    213216 static int ath79_spi_setup_cs(struct spi_device *spi) 
    214217 { 
     
    245248  
    246249        return status; 
    247 @@ -145,9 +155,19 @@ static int ath79_spi_setup_cs(struct spi 
     250@@ -145,9 +158,19 @@ static int ath79_spi_setup_cs(struct spi 
    248251  
    249252 static void ath79_spi_cleanup_cs(struct spi_device *spi) 
     
    268271 } 
    269272  
    270 @@ -155,6 +175,9 @@ static int ath79_spi_setup(struct spi_de 
     273@@ -155,6 +178,9 @@ static int ath79_spi_setup(struct spi_de 
    271274 { 
    272275        int status = 0; 
     
    278281                return -EINVAL; 
    279282  
    280 @@ -215,6 +238,10 @@ static __devinit int ath79_spi_probe(str 
     283@@ -215,6 +241,10 @@ static __devinit int ath79_spi_probe(str 
    281284        unsigned long rate; 
    282285        int ret; 
     
    289292        if (master == NULL) { 
    290293                dev_err(&pdev->dev, "failed to allocate spi master\n"); 
    291 @@ -224,17 +251,10 @@ static __devinit int ath79_spi_probe(str 
     294@@ -224,17 +254,10 @@ static __devinit int ath79_spi_probe(str 
    292295        sp = spi_master_get_devdata(master); 
    293296        platform_set_drvdata(pdev, sp); 
  • trunk/target/linux/ar71xx/patches-3.3/463-spi-ath79-add-fast-flash-read.patch

    r31602 r32736  
    2525  
    2626 static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) 
    27 @@ -108,9 +118,6 @@ static void ath79_spi_enable(struct ath7 
     27@@ -111,9 +121,6 @@ static void ath79_spi_enable(struct ath7 
    2828        /* save CTRL register */ 
    2929        sp->reg_ctrl = ath79_spi_rr(sp, AR71XX_SPI_REG_CTRL); 
     
    3535  
    3636 static void ath79_spi_disable(struct ath79_spi *sp) 
    37 @@ -229,6 +236,110 @@ static u32 ath79_spi_txrx_mode0(struct s 
     37@@ -232,6 +239,110 @@ static u32 ath79_spi_txrx_mode0(struct s 
    3838        return ath79_spi_rr(sp, AR71XX_SPI_REG_RDS); 
    3939 } 
     
    146146 { 
    147147        struct spi_master *master; 
    148 @@ -251,6 +362,8 @@ static __devinit int ath79_spi_probe(str 
     148@@ -254,6 +365,8 @@ static __devinit int ath79_spi_probe(str 
    149149        sp = spi_master_get_devdata(master); 
    150150        platform_set_drvdata(pdev, sp); 
     
    155155        master->cleanup = ath79_spi_cleanup; 
    156156        master->bus_num = pdata->bus_num; 
    157 @@ -259,7 +372,7 @@ static __devinit int ath79_spi_probe(str 
     157@@ -262,7 +375,7 @@ static __devinit int ath79_spi_probe(str 
    158158        sp->bitbang.master = spi_master_get(master); 
    159159        sp->bitbang.chipselect = ath79_spi_chipselect; 
     
    164164  
    165165        r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 
    166 @@ -284,7 +397,8 @@ static __devinit int ath79_spi_probe(str 
     166@@ -287,7 +400,8 @@ static __devinit int ath79_spi_probe(str 
    167167        if (ret) 
    168168                goto err_clk_put; 
Note: See TracChangeset for help on using the changeset viewer.