projects
/
openwrt
/
svn-archive
/
archive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fc8bdf8
)
ar71xx: use gpio_set_value_cansleep on sleeping GPIOs in ath79_spi
author
Gabor Juhos
<juhosg@openwrt.org>
Sun, 15 Jul 2012 17:52:48 +0000
(17:52 +0000)
committer
Gabor Juhos
<juhosg@openwrt.org>
Sun, 15 Jul 2012 17:52:48 +0000
(17:52 +0000)
SVN-Revision: 32736
target/linux/ar71xx/patches-3.3/206-spi-ath79-make-chipselect-logic-more-flexible.patch
patch
|
blob
|
history
target/linux/ar71xx/patches-3.3/463-spi-ath79-add-fast-flash-read.patch
patch
|
blob
|
history
diff --git
a/target/linux/ar71xx/patches-3.3/206-spi-ath79-make-chipselect-logic-more-flexible.patch
b/target/linux/ar71xx/patches-3.3/206-spi-ath79-make-chipselect-logic-more-flexible.patch
index 91713e677693b923844dc3794c3ba15890fa4da1..5a4c0df5d43804f867653588cf148b73962f603a 100644
(file)
--- a/
target/linux/ar71xx/patches-3.3/206-spi-ath79-make-chipselect-logic-more-flexible.patch
+++ b/
target/linux/ar71xx/patches-3.3/206-spi-ath79-make-chipselect-logic-more-flexible.patch
@@
-178,7
+178,7
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
if (is_active) {
/* set initial clock polarity */
if (is_active) {
/* set initial clock polarity */
-@@ -80,20 +83,2
1
@@ static void ath79_spi_chipselect(struct
+@@ -80,20 +83,2
4
@@ static void ath79_spi_chipselect(struct
ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
}
ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
}
@@
-203,13
+203,16
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+ case ATH79_SPI_CS_TYPE_GPIO:
+ /* SPI is normally active-low */
+ case ATH79_SPI_CS_TYPE_GPIO:
+ /* SPI is normally active-low */
-+ gpio_set_value(cdata->cs_line, cs_high);
++ if (gpio_cansleep(cdata->cs_line))
++ gpio_set_value_cansleep(cdata->cs_line, cs_high);
++ else
++ gpio_set_value(cdata->cs_line, cs_high);
+ break;
+ }
}
static void ath79_spi_enable(struct ath79_spi *sp)
+ break;
+ }
}
static void ath79_spi_enable(struct ath79_spi *sp)
-@@ -120,24 +12
4
,30 @@ static void ath79_spi_disable(struct ath
+@@ -120,24 +12
7
,30 @@ static void ath79_spi_disable(struct ath
static int ath79_spi_setup_cs(struct spi_device *spi)
{
struct ath79_spi_controller_data *cdata;
static int ath79_spi_setup_cs(struct spi_device *spi)
{
struct ath79_spi_controller_data *cdata;
@@
-244,7
+247,7
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
}
return status;
}
return status;
-@@ -145,9 +15
5
,19 @@ static int ath79_spi_setup_cs(struct spi
+@@ -145,9 +15
8
,19 @@ static int ath79_spi_setup_cs(struct spi
static void ath79_spi_cleanup_cs(struct spi_device *spi)
{
static void ath79_spi_cleanup_cs(struct spi_device *spi)
{
@@
-267,7
+270,7
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
}
}
}
}
-@@ -155,6 +17
5
,9 @@ static int ath79_spi_setup(struct spi_de
+@@ -155,6 +17
8
,9 @@ static int ath79_spi_setup(struct spi_de
{
int status = 0;
{
int status = 0;
@@
-277,7
+280,7
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
if (spi->bits_per_word > 32)
return -EINVAL;
if (spi->bits_per_word > 32)
return -EINVAL;
-@@ -215,6 +2
38
,10 @@ static __devinit int ath79_spi_probe(str
+@@ -215,6 +2
41
,10 @@ static __devinit int ath79_spi_probe(str
unsigned long rate;
int ret;
unsigned long rate;
int ret;
@@
-288,7
+291,7
@@
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
master = spi_alloc_master(&pdev->dev, sizeof(*sp));
if (master == NULL) {
dev_err(&pdev->dev, "failed to allocate spi master\n");
master = spi_alloc_master(&pdev->dev, sizeof(*sp));
if (master == NULL) {
dev_err(&pdev->dev, "failed to allocate spi master\n");
-@@ -224,17 +25
1
,10 @@ static __devinit int ath79_spi_probe(str
+@@ -224,17 +25
4
,10 @@ static __devinit int ath79_spi_probe(str
sp = spi_master_get_devdata(master);
platform_set_drvdata(pdev, sp);
sp = spi_master_get_devdata(master);
platform_set_drvdata(pdev, sp);
diff --git
a/target/linux/ar71xx/patches-3.3/463-spi-ath79-add-fast-flash-read.patch
b/target/linux/ar71xx/patches-3.3/463-spi-ath79-add-fast-flash-read.patch
index 5268ad44c9e7c04e92082f3c1b0e795917bcbc57..9ccc4a45e02292054eaaaac439e5a33fa5c84e19 100644
(file)
--- a/
target/linux/ar71xx/patches-3.3/463-spi-ath79-add-fast-flash-read.patch
+++ b/
target/linux/ar71xx/patches-3.3/463-spi-ath79-add-fast-flash-read.patch
@@
-24,7
+24,7
@@
};
static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg)
};
static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg)
-@@ -1
08,9 +118
,6 @@ static void ath79_spi_enable(struct ath7
+@@ -1
11,9 +121
,6 @@ static void ath79_spi_enable(struct ath7
/* save CTRL register */
sp->reg_ctrl = ath79_spi_rr(sp, AR71XX_SPI_REG_CTRL);
sp->ioc_base = ath79_spi_rr(sp, AR71XX_SPI_REG_IOC);
/* save CTRL register */
sp->reg_ctrl = ath79_spi_rr(sp, AR71XX_SPI_REG_CTRL);
sp->ioc_base = ath79_spi_rr(sp, AR71XX_SPI_REG_IOC);
@@
-34,7
+34,7
@@
}
static void ath79_spi_disable(struct ath79_spi *sp)
}
static void ath79_spi_disable(struct ath79_spi *sp)
-@@ -2
29,6 +236
,110 @@ static u32 ath79_spi_txrx_mode0(struct s
+@@ -2
32,6 +239
,110 @@ static u32 ath79_spi_txrx_mode0(struct s
return ath79_spi_rr(sp, AR71XX_SPI_REG_RDS);
}
return ath79_spi_rr(sp, AR71XX_SPI_REG_RDS);
}
@@
-145,7
+145,7
@@
static __devinit int ath79_spi_probe(struct platform_device *pdev)
{
struct spi_master *master;
static __devinit int ath79_spi_probe(struct platform_device *pdev)
{
struct spi_master *master;
-@@ -25
1,6 +362
,8 @@ static __devinit int ath79_spi_probe(str
+@@ -25
4,6 +365
,8 @@ static __devinit int ath79_spi_probe(str
sp = spi_master_get_devdata(master);
platform_set_drvdata(pdev, sp);
sp = spi_master_get_devdata(master);
platform_set_drvdata(pdev, sp);
@@
-154,7
+154,7
@@
master->setup = ath79_spi_setup;
master->cleanup = ath79_spi_cleanup;
master->bus_num = pdata->bus_num;
master->setup = ath79_spi_setup;
master->cleanup = ath79_spi_cleanup;
master->bus_num = pdata->bus_num;
-@@ -2
59,7 +372
,7 @@ static __devinit int ath79_spi_probe(str
+@@ -2
62,7 +375
,7 @@ static __devinit int ath79_spi_probe(str
sp->bitbang.master = spi_master_get(master);
sp->bitbang.chipselect = ath79_spi_chipselect;
sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0;
sp->bitbang.master = spi_master_get(master);
sp->bitbang.chipselect = ath79_spi_chipselect;
sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0;
@@
-163,7
+163,7
@@
sp->bitbang.flags = SPI_CS_HIGH;
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
sp->bitbang.flags = SPI_CS_HIGH;
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-@@ -28
4,7 +397
,8 @@ static __devinit int ath79_spi_probe(str
+@@ -28
7,7 +400
,8 @@ static __devinit int ath79_spi_probe(str
if (ret)
goto err_clk_put;
if (ret)
goto err_clk_put;