[SPAM] 如何认定严重失职
-- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [PATCH] dw_spi: add DMA support
On Tue, 23 Nov 2010 14:48:39 +0800 Linus Walleij linus.ml.wall...@gmail.com wrote: This is much better than last time but I still have questions... 2010/11/18 Alan Cox a...@lxorguk.ukuu.org.uk: + /* 1. Init rx channel */ + rxs = dw_dma-dmas_rx; + ds = rxs-dma_slave; + ds-direction = DMA_FROM_DEVICE; + rxs-hs_mode = LNW_DMA_HW_HS; + rxs-cfg_mode = LNW_DMA_PER_TO_MEM; + ds-src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; + ds-dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + ds-src_maxburst = 16; + ds-dst_maxburst = 16; This is great stuff! That is exactly how ds is to be set up. I would prefer that you don't dereference the this rxs thing here but whatever. + dma_cap_zero(mask); + dma_cap_set(DMA_MEMCPY, mask); + dma_cap_set(DMA_SLAVE, mask); This is not elegant. Are you going to do memcpy() or slave transfers? What you want to do is fix your DMA engine so that just asking for DMA_SLAVE works. + dma_cap_set(DMA_SLAVE, mask); + dma_cap_set(DMA_MEMCPY, mask); Here again... +static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change) +{ (...) + flag = DMA_PREP_INTERRUPT | DMA_CTRL_ACK; + if (dws-tx_dma) { + txdesc = txchan-device-device_prep_dma_memcpy(txchan, + dws-dma_addr, dws-tx_dma, + dws-len, flag); + txdesc-callback = dw_spi_dma_done; + txdesc-callback_param = dws-tx_param; + } + + /* 3. start the RX dma transfer */ + if (dws-rx_dma) { + rxdesc = rxchan-device-device_prep_dma_memcpy(rxchan, + dws-rx_dma, dws-dma_addr, + dws-len, flag); + rxdesc-callback = dw_spi_dma_done; + rxdesc-callback_param = dws-rx_param; + } Using device_prep_dma_memcpy() for this is still nonsense, it should be device_prep_slave_sg(). I know the DMA driver needs fixing in order for this to work properly, so why not fix it? These are the most important concerns I raised last iteration, so I challenge you to fix drivers/dma/dw_dmac.c or wherever the real problem sits. Can you describe where the problem with fixing this to use real slave sglists is? Yours, Linus Walleij Hi Linus, Thanks for the reviews, I made some dma change as you suggested, pls help to review. Thanks, Feng From b77efc5945e31442b53b285d6a3f77def376ebb3 Mon Sep 17 00:00:00 2001 From: Feng Tang feng.t...@intel.com Date: Tue, 23 Nov 2010 17:34:28 +0800 Subject: [PATCH] spi/dw_spi: add DMA support dw_spi driver in upstream only supports PIO mode, and this patch will support it to cowork with the Designware DMA controller used on Intel Moorestown platform It has been tested with a Option GTM501L 3G modem, to use DMA mode, DMA controller 2 of Moorestown has to be enabled Signed-off-by: Feng Tang feng.t...@intel.com [Typo fix and renames to match intel_mid_dma renaming] Signed-off-by: Vinod Koul vinod.k...@intel.com [Clean up, change dma interface suggested by Linus Walleij] Signed-off-by: Feng Tang feng.t...@intel.com [Fix timing delay, add cpu_relax] Signed-off-by: Arjan van de Ven ar...@linux.intel.com Signed-off-by: Alan Cox a...@linux.intel.com --- drivers/spi/Kconfig|4 + drivers/spi/Makefile |3 +- drivers/spi/dw_spi.c | 48 ++ drivers/spi/dw_spi_mid.c | 225 drivers/spi/dw_spi_pci.c | 14 ++- include/linux/spi/dw_spi.h | 24 - 6 files changed, 288 insertions(+), 30 deletions(-) create mode 100644 drivers/spi/dw_spi_mid.c diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 78f9fd0..d53c830 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -396,6 +396,10 @@ config SPI_DW_PCI tristate PCI interface driver for DW SPI core depends on SPI_DESIGNWARE PCI +config SPI_DW_MID_DMA + bool DMA support for DW SPI controller on Intel Moorestown platform + depends on SPI_DW_PCI INTEL_MID_DMAC + config SPI_DW_MMIO tristate Memory-mapped io interface driver for DW SPI core depends on SPI_DESIGNWARE HAVE_CLK diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index 8bc1a5a..5e6e812 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -17,7 +17,8 @@ obj-$(CONFIG_SPI_BUTTERFLY) += spi_butterfly.o obj-$(CONFIG_SPI_COLDFIRE_QSPI)+= coldfire_qspi.o obj-$(CONFIG_SPI_DAVINCI) += davinci_spi.o obj-$(CONFIG_SPI_DESIGNWARE) += dw_spi.o -obj-$(CONFIG_SPI_DW_PCI) += dw_spi_pci.o +obj-$(CONFIG_SPI_DW_PCI) += dw_spi_midpci.o +dw_spi_midpci-objs := dw_spi_pci.o dw_spi_mid.o obj-$(CONFIG_SPI_DW_MMIO)
Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h
Hello David, Le 22/11/2010 22:52, David Brownell a écrit : --- On Mon, 11/22/10, Alexis RODET alexis.ro...@bvs-tech.com wrote: And this patch doesn't touch machine or driver code, so it's incomplete. Look at the patch in previous mail attachment and you'll see it does. Couldn't do that. Submit another patch, or combine it with this one. Either way, once it merges, git bisect needs to work... How about a patch that does the full rename?? What do you mean ? Apply the patch and everthing builds and works; and if it's a series, git bisect also works. So Here is the patch: It modifies all *.c files that include linux/spi/flash.h and also the include/linux/spi/flash.h file to rename 'struct flash_platform_data' into 'struct spi_flash_platform_data' Here is the command line used for doing this: find . \( -name .git -prune -false -o -path \ ./include/linux/spi/flash.h \ -o \( -name \*.c -execdir grep -q \ '#include linux/spi/flash.h' \{\} \; \) \) -execdir sed -i -e \ 's/struct flash_platform_data/struct spi_flash_platform_data/' \ \{\} \+ -execdir git add \{\} \+ -print I didn't test all compilations as I don't have blackfin nor mips compiler installed. I compiled successfully for x86 with allyesconfig and for Freescale mx27 with allmodconfig minus some incompatible drivers. Best regards, Alexis RODET --- arch/arm/mach-at91/board-cam60.c |2 +- arch/arm/mach-at91/board-ecbat91.c |2 +- arch/arm/mach-dove/dove-db-setup.c |2 +- arch/arm/mach-kirkwood/lacie_v2-common.c |2 +- arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |2 +- arch/arm/mach-kirkwood/rd88f6192-nas-setup.c |2 +- arch/arm/mach-kirkwood/t5325-setup.c |2 +- arch/arm/mach-kirkwood/tsx1x-common.c |2 +- arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c |2 +- arch/arm/mach-w90x900/dev.c|2 +- arch/blackfin/mach-bf518/boards/ezbrd.c|2 +- arch/blackfin/mach-bf518/boards/tcm-bf518.c|2 +- arch/blackfin/mach-bf527/boards/ad7160eval.c |2 +- arch/blackfin/mach-bf527/boards/cm_bf527.c |2 +- arch/blackfin/mach-bf527/boards/ezbrd.c|2 +- arch/blackfin/mach-bf527/boards/ezkit.c|2 +- arch/blackfin/mach-bf527/boards/tll6527m.c |2 +- arch/blackfin/mach-bf533/boards/H8606.c|2 +- arch/blackfin/mach-bf533/boards/blackstamp.c |2 +- arch/blackfin/mach-bf533/boards/cm_bf533.c |2 +- arch/blackfin/mach-bf533/boards/ezkit.c|2 +- arch/blackfin/mach-bf533/boards/stamp.c|2 +- arch/blackfin/mach-bf537/boards/cm_bf537e.c|2 +- arch/blackfin/mach-bf537/boards/cm_bf537u.c|2 +- arch/blackfin/mach-bf537/boards/minotaur.c |2 +- arch/blackfin/mach-bf537/boards/pnav10.c |2 +- arch/blackfin/mach-bf537/boards/stamp.c|4 ++-- arch/blackfin/mach-bf537/boards/tcm_bf537.c|2 +- arch/blackfin/mach-bf538/boards/ezkit.c|2 +- arch/blackfin/mach-bf548/boards/cm_bf548.c |2 +- arch/blackfin/mach-bf548/boards/ezkit.c|2 +- arch/blackfin/mach-bf561/boards/acvilon.c |2 +- arch/blackfin/mach-bf561/boards/cm_bf561.c |2 +- arch/mips/alchemy/devboards/db1200/platform.c |2 +- drivers/mtd/devices/m25p80.c |2 +- drivers/mtd/devices/mtd_dataflash.c|2 +- drivers/mtd/devices/sst25l.c |2 +- drivers/spi/spi_butterfly.c|2 +- include/linux/spi/flash.h |4 ++-- 39 files changed, 41 insertions(+), 41 deletions(-) diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index b54e3e6..50780b2 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c @@ -98,7 +98,7 @@ static struct mtd_partition cam60_spi_partitions[] = { }, }; -static struct flash_platform_data cam60_spi_flash_platform_data = { +static struct spi_flash_platform_data cam60_spi_flash_platform_data = { .name = spi_flash, .parts = cam60_spi_partitions, .nr_parts = ARRAY_SIZE(cam60_spi_partitions) diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 7b58c94..8598237 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c @@ -110,7 +110,7 @@ static struct mtd_partition __initdata my_flash0_partitions[] = } }; -static struct flash_platform_data __initdata my_flash0_platform = { +static struct spi_flash_platform_data __initdata my_flash0_platform = { .name = Removable flash card, .parts = my_flash0_partitions, .nr_parts = ARRAY_SIZE(my_flash0_partitions) diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c index 95925aa..90f8f95 100644 --- a/arch/arm/mach-dove/dove-db-setup.c +++
Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h
Le 23/11/2010 10:36, Baruch Siach a écrit : Hi Alexis, So Here is the patch: [snip] -static struct flash_platform_data __initdata my_flash0_platform = { +static struct spi_flash_platform_data __initdata my_flash0_platform = { Your patch seems to have been mangled by your mailer. A whitespace were added at the beginning of the line before '-static'. baruch I hope mail mailer will respect the copy-paste. Alexis From 2dc4b4dd076c8ba0d9143cb6664e3413a4886850 Mon Sep 17 00:00:00 2001 In-Reply-To: 20101117160514.ga5...@n2100.arm.linux.org.uk References: 20101117160514.ga5...@n2100.arm.linux.org.uk From: Alexis RODET alexis.ro...@bvs-tech.com Date: Thu, 18 Nov 2010 10:34:59 +0100 Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h To: linux-arm-ker...@lists.infradead.org Signed-off-by: Alexis RODET alexis.ro...@bvs-tech.com Here is the command line used for doing this: find . \( -name .git -prune -false -o -path ./include/linux/spi/flash.h -o \( -name \*.c -execdir grep -q '#include linux/spi/flash.h' \{\} \; \) \) -execdir sed -i -e 's/struct flash_platform_data/struct spi_flash_platform_data/' \{\} \+ -execdir git add \{\} \+ -print I didn't test all compilation as I don't have blackfin compiler installed and I'm quite lasy and also busy. I compiled for my x86 with allyesconfig and for Freescale mx27 with allyesconfig minus a number of buggy drivers. --- arch/arm/mach-at91/board-cam60.c |2 +- arch/arm/mach-at91/board-ecbat91.c |2 +- arch/arm/mach-dove/dove-db-setup.c |2 +- arch/arm/mach-kirkwood/lacie_v2-common.c |2 +- arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |2 +- arch/arm/mach-kirkwood/rd88f6192-nas-setup.c |2 +- arch/arm/mach-kirkwood/t5325-setup.c |2 +- arch/arm/mach-kirkwood/tsx1x-common.c |2 +- arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c |2 +- arch/arm/mach-w90x900/dev.c|2 +- arch/blackfin/mach-bf518/boards/ezbrd.c|2 +- arch/blackfin/mach-bf518/boards/tcm-bf518.c|2 +- arch/blackfin/mach-bf527/boards/ad7160eval.c |2 +- arch/blackfin/mach-bf527/boards/cm_bf527.c |2 +- arch/blackfin/mach-bf527/boards/ezbrd.c|2 +- arch/blackfin/mach-bf527/boards/ezkit.c|2 +- arch/blackfin/mach-bf527/boards/tll6527m.c |2 +- arch/blackfin/mach-bf533/boards/H8606.c|2 +- arch/blackfin/mach-bf533/boards/blackstamp.c |2 +- arch/blackfin/mach-bf533/boards/cm_bf533.c |2 +- arch/blackfin/mach-bf533/boards/ezkit.c|2 +- arch/blackfin/mach-bf533/boards/stamp.c|2 +- arch/blackfin/mach-bf537/boards/cm_bf537e.c|2 +- arch/blackfin/mach-bf537/boards/cm_bf537u.c|2 +- arch/blackfin/mach-bf537/boards/minotaur.c |2 +- arch/blackfin/mach-bf537/boards/pnav10.c |2 +- arch/blackfin/mach-bf537/boards/stamp.c|4 ++-- arch/blackfin/mach-bf537/boards/tcm_bf537.c|2 +- arch/blackfin/mach-bf538/boards/ezkit.c|2 +- arch/blackfin/mach-bf548/boards/cm_bf548.c |2 +- arch/blackfin/mach-bf548/boards/ezkit.c|2 +- arch/blackfin/mach-bf561/boards/acvilon.c |2 +- arch/blackfin/mach-bf561/boards/cm_bf561.c |2 +- arch/mips/alchemy/devboards/db1200/platform.c |2 +- drivers/mtd/devices/m25p80.c |2 +- drivers/mtd/devices/mtd_dataflash.c|2 +- drivers/mtd/devices/sst25l.c |2 +- drivers/spi/spi_butterfly.c|2 +- include/linux/spi/flash.h |4 ++-- 39 files changed, 41 insertions(+), 41 deletions(-) diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index b54e3e6..50780b2 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c @@ -98,7 +98,7 @@ static struct mtd_partition cam60_spi_partitions[] = { }, }; -static struct flash_platform_data cam60_spi_flash_platform_data = { +static struct spi_flash_platform_data cam60_spi_flash_platform_data = { .name= spi_flash, .parts= cam60_spi_partitions, .nr_parts= ARRAY_SIZE(cam60_spi_partitions) diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 7b58c94..8598237 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c @@ -110,7 +110,7 @@ static struct mtd_partition __initdata my_flash0_partitions[] = } }; -static struct flash_platform_data __initdata my_flash0_platform = { +static struct spi_flash_platform_data __initdata my_flash0_platform = { .name= Removable flash card, .parts= my_flash0_partitions, .nr_parts= ARRAY_SIZE(my_flash0_partitions) diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c index
Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h
Hi baruch, I hope this time every thing is OK. Le 23/11/2010 10:44, Baruch Siach a écrit : Hi Alexis, Well, you mailer still breaks lines, e.g.: @@ -52,7 +52,7 @@ static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = { baruch From 2dc4b4dd076c8ba0d9143cb6664e3413a4886850 Mon Sep 17 00:00:00 2001 In-Reply-To: 20101117160514.ga5...@n2100.arm.linux.org.uk References: 20101117160514.ga5...@n2100.arm.linux.org.uk From: Alexis RODET alexis.ro...@bvs-tech.com Date: Thu, 18 Nov 2010 10:34:59 +0100 Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h To: linux-arm-ker...@lists.infradead.org Signed-off-by: Alexis RODET alexis.ro...@bvs-tech.com Here is the command line used for doing this: find . \( -name .git -prune -false -o -path ./include/linux/spi/flash.h -o \( -name \*.c -execdir grep -q '#include linux/spi/flash.h' \{\} \; \) \) -execdir sed -i -e 's/struct flash_platform_data/struct spi_flash_platform_data/' \{\} \+ -execdir git add \{\} \+ -print I didn't test all compilation as I don't have blackfin compiler installed and I'm quite lasy and also busy. I compiled for my x86 with allyesconfig and for Freescale mx27 with allyesconfig minus a number of buggy drivers. --- arch/arm/mach-at91/board-cam60.c |2 +- arch/arm/mach-at91/board-ecbat91.c |2 +- arch/arm/mach-dove/dove-db-setup.c |2 +- arch/arm/mach-kirkwood/lacie_v2-common.c |2 +- arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |2 +- arch/arm/mach-kirkwood/rd88f6192-nas-setup.c |2 +- arch/arm/mach-kirkwood/t5325-setup.c |2 +- arch/arm/mach-kirkwood/tsx1x-common.c |2 +- arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c |2 +- arch/arm/mach-w90x900/dev.c|2 +- arch/blackfin/mach-bf518/boards/ezbrd.c|2 +- arch/blackfin/mach-bf518/boards/tcm-bf518.c|2 +- arch/blackfin/mach-bf527/boards/ad7160eval.c |2 +- arch/blackfin/mach-bf527/boards/cm_bf527.c |2 +- arch/blackfin/mach-bf527/boards/ezbrd.c|2 +- arch/blackfin/mach-bf527/boards/ezkit.c|2 +- arch/blackfin/mach-bf527/boards/tll6527m.c |2 +- arch/blackfin/mach-bf533/boards/H8606.c|2 +- arch/blackfin/mach-bf533/boards/blackstamp.c |2 +- arch/blackfin/mach-bf533/boards/cm_bf533.c |2 +- arch/blackfin/mach-bf533/boards/ezkit.c|2 +- arch/blackfin/mach-bf533/boards/stamp.c|2 +- arch/blackfin/mach-bf537/boards/cm_bf537e.c|2 +- arch/blackfin/mach-bf537/boards/cm_bf537u.c|2 +- arch/blackfin/mach-bf537/boards/minotaur.c |2 +- arch/blackfin/mach-bf537/boards/pnav10.c |2 +- arch/blackfin/mach-bf537/boards/stamp.c|4 ++-- arch/blackfin/mach-bf537/boards/tcm_bf537.c|2 +- arch/blackfin/mach-bf538/boards/ezkit.c|2 +- arch/blackfin/mach-bf548/boards/cm_bf548.c |2 +- arch/blackfin/mach-bf548/boards/ezkit.c|2 +- arch/blackfin/mach-bf561/boards/acvilon.c |2 +- arch/blackfin/mach-bf561/boards/cm_bf561.c |2 +- arch/mips/alchemy/devboards/db1200/platform.c |2 +- drivers/mtd/devices/m25p80.c |2 +- drivers/mtd/devices/mtd_dataflash.c|2 +- drivers/mtd/devices/sst25l.c |2 +- drivers/spi/spi_butterfly.c|2 +- include/linux/spi/flash.h |4 ++-- 39 files changed, 41 insertions(+), 41 deletions(-) diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index b54e3e6..50780b2 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c @@ -98,7 +98,7 @@ static struct mtd_partition cam60_spi_partitions[] = { }, }; -static struct flash_platform_data cam60_spi_flash_platform_data = { +static struct spi_flash_platform_data cam60_spi_flash_platform_data = { .name= spi_flash, .parts= cam60_spi_partitions, .nr_parts= ARRAY_SIZE(cam60_spi_partitions) diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 7b58c94..8598237 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c @@ -110,7 +110,7 @@ static struct mtd_partition __initdata my_flash0_partitions[] = } }; -static struct flash_platform_data __initdata my_flash0_platform = { +static struct spi_flash_platform_data __initdata my_flash0_platform = { .name= Removable flash card, .parts= my_flash0_partitions, .nr_parts= ARRAY_SIZE(my_flash0_partitions) diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c index 95925aa..90f8f95 100644 --- a/arch/arm/mach-dove/dove-db-setup.c +++ b/arch/arm/mach-dove/dove-db-setup.c @@ -40,7 +40,7 @@ static struct mv_sata_platform_data dove_db_sata_data =
Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h
Hi Alexis, On Tue, Nov 23, 2010 at 10:41:13AM +0100, Alexis RODET wrote: Le 23/11/2010 10:36, Baruch Siach a écrit : Hi Alexis, So Here is the patch: [snip] -static struct flash_platform_data __initdata my_flash0_platform = { +static struct spi_flash_platform_data __initdata my_flash0_platform = { Your patch seems to have been mangled by your mailer. A whitespace were added at the beginning of the line before '-static'. baruch I hope mail mailer will respect the copy-paste. Well, you mailer still breaks lines, e.g.: @@ -52,7 +52,7 @@ static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = { baruch -- ~. .~ Tk Open Systems =}ooO--U--Ooo{= - bar...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il - -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h
Hi Alexis, On Tue, Nov 23, 2010 at 10:30:46AM +0100, Alexis RODET wrote: Le 22/11/2010 22:52, David Brownell a écrit : --- On Mon, 11/22/10, Alexis RODET alexis.ro...@bvs-tech.com wrote: And this patch doesn't touch machine or driver code, so it's incomplete. Look at the patch in previous mail attachment and you'll see it does. Couldn't do that. Submit another patch, or combine it with this one. Either way, once it merges, git bisect needs to work... How about a patch that does the full rename?? What do you mean ? Apply the patch and everthing builds and works; and if it's a series, git bisect also works. So Here is the patch: [snip] -static struct flash_platform_data __initdata my_flash0_platform = { +static struct spi_flash_platform_data __initdata my_flash0_platform = { Your patch seems to have been mangled by your mailer. A whitespace were added at the beginning of the line before '-static'. baruch -- ~. .~ Tk Open Systems =}ooO--U--Ooo{= - bar...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il - -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: spi/spi: don't release the spi device twice
David Lamparter wrote: This code is the old code, before patch 3486008 which you're citing. 3486008 does: - dummy = device_for_each_child(master-dev.parent, master-dev, - __unregister); + dummy = device_for_each_child(master-dev, NULL, __unregister); Considering that this patch is in 2.6.36 (and 36.1), you seem to have mixed up your sources. Please make sure your checkout is current and unbroken... Hmmm. # git describe --long v2.6.37-rc3-0-g3561d43 After looking at spi_unregister_master() in drivers/spi/spi.c, I see: dummy = device_for_each_child(master-dev.parent, master-dev, __unregister); device_unregister(master-dev); } This change got back in by: commit 2b9603a0d7e395fb844af90fba71448bc8019077 Author: Feng Tang feng.t...@intel.com Date: Mon Aug 2 15:52:15 2010 +0800 spi: enable spi_board_info to be registered after spi_master which is v2.6.37-rc1~2^2~4. So I probably mixed up you with Feng. This thread starts at http://www.mail-archive.com/spi-devel-general@lists.sourceforge.net/msg05437.html David Sebastian -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: spi/spi: don't release the spi device twice
Hi Sebastian, On Tue, 23 Nov 2010 18:33:03 +0800 Sebastian Andrzej Siewior bige...@linutronix.de wrote: David Lamparter wrote: This code is the old code, before patch 3486008 which you're citing. 3486008 does: - dummy = device_for_each_child(master-dev.parent, master-dev, - __unregister); + dummy = device_for_each_child(master-dev, NULL, __unregister); Considering that this patch is in 2.6.36 (and 36.1), you seem to have mixed up your sources. Please make sure your checkout is current and unbroken... Hmmm. # git describe --long v2.6.37-rc3-0-g3561d43 After looking at spi_unregister_master() in drivers/spi/spi.c, I see: dummy = device_for_each_child(master-dev.parent, master-dev, __unregister); device_unregister(master-dev); } This change got back in by: commit 2b9603a0d7e395fb844af90fba71448bc8019077 Author: Feng Tang feng.t...@intel.com Date: Mon Aug 2 15:52:15 2010 +0800 spi: enable spi_board_info to be registered after spi_master which is v2.6.37-rc1~2^2~4. So I probably mixed up you with Feng. This thread starts at http://www.mail-archive.com/spi-devel-general@lists.sourceforge.net/msg05437.html I checked my original patch which didn't touch the logic of spi_unregister_master() as - @@ -568,6 +592,10 @@ void spi_unregister_master(struct spi_master *master) { int dummy; + mutex_lock(board_lock); + list_del(master-list); + mutex_unlock(board_lock); + dummy = device_for_each_child(master-dev.parent, master-dev, __unregister); device_unregister(master-dev); - So this should be a merge problem, which corrupt the commit from David's commit 3486008 spi: free children in spi_unregister_master, not siblings Thanks, Feng -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
[PATCH v2] spi/spi: don't release the spi device twice
This was fixed by David Lamparter in v2.6.36-rc5 3486008 (spi: free children in spi_unregister_master, not siblings) and broken again in v2.6.37-rc1~2^2~4 during the merge of 2b9603a0 (spi: enable spi_board_info to be registered after spi_master). Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- Okay, Feng. So here is the merge fixup. drivers/spi/spi.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 709c836..b02d0cb 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -584,8 +584,7 @@ void spi_unregister_master(struct spi_master *master) list_del(master-list); mutex_unlock(board_lock); - dummy = device_for_each_child(master-dev.parent, master-dev, - __unregister); + dummy = device_for_each_child(master-dev, NULL, __unregister); device_unregister(master-dev); } EXPORT_SYMBOL_GPL(spi_unregister_master); -- 1.7.3.2 -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
[PATCH 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: Grant Likely grant.lik...@secretlab.ca Cc: David Brownell dbrown...@users.sourceforge.net Cc: spi-devel-general@lists.sourceforge.net --- Changes since RFC: - remove DRV_DESC definition and use its previous value directly in the MODULE_DESCRIPTION() macro, - use io{read,write}32 accesors instead of __raw_{read,write}l, - use __dev{init,exit,exit_p} annotations where in the appropriate places, - initialize 'master-bus_num' field to -1 if no platform data specified, so that a bus number can be dynamically assigned, - rename ath79_spi_drv to ath79_spi_driver to avoid section mismatch warnings .../include/asm/mach-ath79/ath79_spi_platform.h| 19 ++ drivers/spi/Kconfig|8 + drivers/spi/Makefile |1 + drivers/spi/ath79_spi.c| 290 4 files changed, 318 insertions(+), 0 deletions(-) create mode 100644 arch/mips/include/asm/mach-ath79/ath79_spi_platform.h create mode 100644 drivers/spi/ath79_spi.c diff --git a/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h new file mode 100644 index 000..aa71216 --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h @@ -0,0 +1,19 @@ +/* + * Platform data definition for Atheros AR71XX/AR724X/AR913X SPI controller + * + * Copyright (C) 2008-2010 Gabor Juhos juh...@openwrt.org + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#ifndef _ATH79_SPI_PLATFORM_H +#define _ATH79_SPI_PLATFORM_H + +struct ath79_spi_platform_data { + unsignedbus_num; + unsignednum_chipselect; +}; + +#endif /* _ATH79_SPI_PLATFORM_H */ diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 78f9fd0..f2093e1 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -53,6 +53,14 @@ if SPI_MASTER comment SPI Master Controller Drivers +config SPI_ATH79 + tristate Atheros AR71XX/AR724X/AR913X SPI controller driver + depends on ATH79 GENERIC_GPIO + select SPI_BITBANG + help + This enables support for the SPI controller present on the + Atheros AR71XX/AR724X/AR913X SoCs. + config SPI_ATMEL tristate Atmel SPI Controller depends on (ARCH_AT91 || AVR32) diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index 8bc1a5a..875bc3d 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_SPI_MASTER) += spi.o # SPI master controller drivers (bus) obj-$(CONFIG_SPI_ATMEL)+= atmel_spi.o +obj-$(CONFIG_SPI_ATH79)+= ath79_spi.o obj-$(CONFIG_SPI_BFIN) += spi_bfin5xx.o obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o obj-$(CONFIG_SPI_AU1550) += au1550_spi.o diff --git a/drivers/spi/ath79_spi.c b/drivers/spi/ath79_spi.c new file mode 100644 index 000..96f169a --- /dev/null +++ b/drivers/spi/ath79_spi.c @@ -0,0 +1,290 @@ +/* + * SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs + * + * Copyright (C) 2009-2010 Gabor Juhos juh...@openwrt.org + * + * This driver has been based on the spi-gpio.c: + * Copyright (C) 2006,2008 David Brownell + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include linux/kernel.h +#include linux/init.h +#include linux/delay.h +#include linux/spinlock.h +#include linux/workqueue.h +#include linux/platform_device.h +#include linux/io.h +#include linux/spi/spi.h +#include linux/spi/spi_bitbang.h +#include linux/bitops.h +#include linux/gpio.h + +#include asm/mach-ath79/ar71xx_regs.h +#include asm/mach-ath79/ath79_spi_platform.h + +#define DRV_NAME ath79-spi + +struct ath79_spi { + struct spi_bitbang bitbang; + u32 ioc_base; + u32 reg_ctrl; + + void __iomem*base; + + struct platform_device *pdev; +}; + +static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) +{ + return ioread32(sp-base + reg); +} + +static inline void ath79_spi_wr(struct ath79_spi *sp, unsigned reg, u32 val) +{ + iowrite32(val, sp-base + reg); +} + +static inline struct ath79_spi *spidev_to_sp(struct spi_device *spi) +{ + return spi_master_get_devdata(spi-master); +} + +static void ath79_spi_chipselect(struct spi_device *spi, int is_active) +{ + struct ath79_spi *sp = spidev_to_sp(spi); + int cs_high = (spi-mode SPI_CS_HIGH) ?
Re: [PATCH v2] spi/spi: don't release the spi device twice
This was fixed by David Lamparter in v2.6.36-rc5 3486008 (spi: free children in spi_unregister_master, not siblings) and broken again in v2.6.37-rc1~2^2~4 during the merge of 2b9603a0 (spi: enable spi_board_info to be registered after spi_master). Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- - dummy = device_for_each_child(master-dev.parent, master-dev, - __unregister); + dummy = device_for_each_child(master-dev, NULL, __unregister); Signed-off-by: David Lamparter equi...@diac24.net very simple merge/rebase/forward-port breakage... Feng, can you check 2b9603a0 for whether anything else got broken? -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
[SPAM] Relooker votre site, valoriser votre image !
SIvous n'arrivez paa à lire ce mail correctement - http://www.nos- realisations.com/entree.htm Refondre, reloocker, refaire. Pour que votre site, votre boutique soient vus autrement. Vous démarquer en valorisant votre image. Nos réalisations sont nos meilleurs arguments. Voir un aperçu de nos refontes Un site Internet, une boutique de qualité. Une charte graphique unique. Un développement sur mesure, clé en main. En visualisant nos exemples, ayez une idée réelle de leurs qualités. Voir un aperçu de nos réalisations Nous sommes une véritable agence de créations et de conseils, et non pas revendeur de sites Internet préconçus. Toutes nos conceptions et chartes graphiques sont créées par nos infographistes et rédacteurs. Elles vous garantissent ainsi l'originalité et votre efficacité sur Internet. Obtenir des renseignements, un devis SIvous n'arrivez paa à lire ce mail correctement - http://www.nos- realisations.com/entree.htm refontes est édité par Vonao RCS Paris 482 741 303 * Pour ne plus recevoir ce message cliquer sur le lien suivant: http://www.stat-enreg-1.com/out/desinscrquestion.php? u=79b=Cc=15316m=spi-devel-gene...@lists.sourceforge.netlng=fr ** -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [PATCH v2] spi/spi: don't release the spi device twice
On Wed, 24 Nov 2010 00:45:20 +0800 David Lamparter equi...@diac24.net wrote: This was fixed by David Lamparter in v2.6.36-rc5 3486008 (spi: free children in spi_unregister_master, not siblings) and broken again in v2.6.37-rc1~2^2~4 during the merge of 2b9603a0 (spi: enable spi_board_info to be registered after spi_master). Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- - dummy = device_for_each_child(master-dev.parent, master-dev, - __unregister); + dummy = device_for_each_child(master-dev, NULL, __unregister); Signed-off-by: David Lamparter equi...@diac24.net very simple merge/rebase/forward-port breakage... Feng, can you check 2b9603a0 for whether anything else got broken? I just checked, all other parts should be ok. Thanks, Feng -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general