ARM: LPC32xx: Adjust to pl08x DMA interface changes
Subsystems (5)
PATCH 1/1 ARM: LPC32xx: Adjust to pl08x DMA interface changes
This patch adjusts the LPC32xx platform support to the new pl08x DMA interface, fixing the compile error resulting from changed pl08x structures.
---
Applies to today's linux-next (integrated lpc32xx-next and dma branches which collide)
arch/arm/mach-lpc32xx/phy3250.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
arch/arm/mach-lpc32xx/phy3250.c +3 -4
@@ -186,13 +186,12 @@ static struct pl08x_channel_data pl08x_slave_channels[] = { }, }; -/* NOTE: These will change, according to RMK */ -static int pl08x_get_signal (struct pl08x_dma_chan *ch) +static int pl08x_get_signal (const struct pl08x_channel_data *cd) { -return ch->cd->min_signal; +return cd->min_signal; } -static void pl08x_put_signal (struct pl08x_dma_chan *ch) +static void pl08x_put_signal (const struct pl08x_channel_data *cd,int ch) { }
Signature · 1 line
1.7.10.4
PATCH 1/2 mtd: lpc32xx_slc: Adjust to pl08x DMA interface changes
This patch adjusts the LPC32xx SLC NAND driver to the new pl08x DMA interface, fixing the compile error resulting from changed pl08x structures.
---
Applies to today's linux-next (integrated lpc32xx-next and dma branches which collide)
drivers/mtd/nand/lpc32xx_slc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/mtd/nand/lpc32xx_slc.c +1 -12
@@ -714,17 +714,6 @@ static int lpc32xx_nand_write_page_raw_syndrome(struct mtd_info *mtd,return 0 ; } -static bool lpc32xx_dma_filter (struct dma_chan *chan,void *param) -{ -struct pl08x_dma_chan *ch = - container_of(chan, struct pl08x_dma_chan, chan); - -/* In LPC32xx's PL080 DMA wiring, the SLC NAND DMA signal is #1 */ -if (ch->cd->min_signal ==1 ) -return true; -return false; -} -static int lpc32xx_nand_dma_setup (struct lpc32xx_nand_host *host) {struct mtd_info *mtd = &host->mtd;
@@ -732,7 +721,7 @@ static int lpc32xx_nand_dma_setup(struct lpc32xx_nand_host *host)dma_cap_zero (mask);dma_cap_set (DMA_SLAVE , mask); - host->dma_chan =dma_request_channel (mask, lpc32xx_dma_filter,NULL ); + host->dma_chan =dma_request_channel (mask, pl08x_filter_id,"nand-slc" );if (!host->dma_chan) {dev_err (mtd->dev.parent,"Failed to request DMA channel\n" );return -EBUSY ;
Signature · 1 line
1.7.10.4
Re: [PATCH 1/2] mtd: lpc32xx_slc: Adjust to pl08x DMA interface changes
Quoted 4 lines · Roland Stigge
This patch adjusts the LPC32xx SLC NAND driver to the new pl08x DMA interface, fixing the compile error resulting from changed pl08x structures.
Signed-off-by Roland Stigge <[email protected]>
Quoted 41 lines
---
Applies to today's linux-next (integrated lpc32xx-next and dma branches which collide)
drivers/mtd/nand/lpc32xx_slc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)drivers/mtd/nand/lpc32xx_slc.c +1
-13@@ -714,17 +714,6 @@ static int lpc32xx_nand_write_page_raw_syndrome(struct mtd_info *mtd,return 0 ; } -static bool lpc32xx_dma_filter (struct dma_chan *chan,void *param) -{ -struct pl08x_dma_chan *ch = - container_of(chan, struct pl08x_dma_chan, chan); - -/* In LPC32xx's PL080 DMA wiring, the SLC NAND DMA signal is #1 */ -if (ch->cd->min_signal ==1 ) -return true; -return false; -} -static int lpc32xx_nand_dma_setup (struct lpc32xx_nand_host *host) {struct mtd_info *mtd = &host->mtd;@@ -732,7 +721,7 @@ static int lpc32xx_nand_dma_setup(struct lpc32xx_nand_host *host)dma_cap_zero (mask);dma_cap_set (DMA_SLAVE , mask); - host->dma_chan =dma_request_channel (mask, lpc32xx_dma_filter,NULL ); + host->dma_chan =dma_request_channel (mask, pl08x_filter_id,"nand-slc" );if (!host->dma_chan) {dev_err (mtd->dev.parent,"Failed to request DMA channel\n" );return -EBUSY ; --1.7.10.4
Re: [PATCH 1/2] mtd: lpc32xx_slc: Adjust to pl08x DMA interface changes
In reply to Roland StiggeQuoted 4 lines · Roland Stigge
This patch adjusts the LPC32xx SLC NAND driver to the new pl08x DMA interface, fixing the compile error resulting from changed pl08x structures.
Signed-off-by Roland Stigge <[email protected]>
This patch breaks compilation:
ERROR: "pl08x_filter_id" [drivers/mtd/nand/lpc32xx_slc.ko] undefined!
Please, send a fix. The defconfig I used is attached.
Signature · 2 lines
Best Regards, Artem Bityutskiy
CONFIG_EXPERIMENTAL=yCONFIG_SYSVIPC=yCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=yCONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=yCONFIG_LOG_BUF_SHIFT=16 CONFIG_SYSFS_DEPRECATED=y CONFIG_SYSFS_DEPRECATED_V2=y CONFIG_BLK_DEV_INITRD=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL_SYSCALL=yCONFIG_EMBEDDED=yCONFIG_SLAB=yCONFIG_JUMP_LABEL=yCONFIG_MODULES=yCONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set CONFIG_PARTITION_ADVANCED=y CONFIG_ARCH_LPC32XX=yCONFIG_PREEMPT=yCONFIG_AEABI=yCONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_CMDLINE="console=ttyS0,115200n81 root=/dev/ram0" CONFIG_CPU_IDLE=yCONFIG_FPE_NWFPE=yCONFIG_VFP=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_BINFMT_AOUT=yCONFIG_NET=yCONFIG_PACKET=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_IP_PNP=yCONFIG_IP_PNP_DHCP=yCONFIG_IP_PNP_BOOTP=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not setCONFIG_IPV6=yCONFIG_IPV6_PRIVACY=y
# CONFIG_WIRELESS is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
# CONFIG_FW_LOADER is not setCONFIG_MTD=mCONFIG_MTD_TESTS=mCONFIG_MTD_REDBOOT_PARTS=m CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=10000 CONFIG_MTD_AFS_PARTS=mCONFIG_MTD_AR7_PARTS=mCONFIG_MTD_CHAR=mCONFIG_MTD_BLOCK=mCONFIG_FTL=mCONFIG_NFTL=mCONFIG_NFTL_RW=yCONFIG_INFTL=mCONFIG_RFD_FTL=mCONFIG_SSFDC=mCONFIG_SM_FTL=mCONFIG_MTD_OOPS=mCONFIG_MTD_SWAP=mCONFIG_MTD_CFI=mCONFIG_MTD_JEDECPROBE=m CONFIG_MTD_CFI_INTELEXT=m CONFIG_MTD_CFI_AMDSTD=mCONFIG_MTD_CFI_STAA=mCONFIG_MTD_ROM=mCONFIG_MTD_ABSENT=m CONFIG_MTD_COMPLEX_MAPPINGS=y CONFIG_MTD_PHYSMAP=m CONFIG_MTD_PHYSMAP_COMPAT=y CONFIG_MTD_PHYSMAP_OF=mCONFIG_MTD_IMPA7=mCONFIG_MTD_GPIO_ADDR=mCONFIG_MTD_PLATRAM=mCONFIG_MTD_LATCH_ADDR=mCONFIG_MTD_DATAFLASH=m CONFIG_MTD_DATAFLASH_WRITE_VERIFY=y CONFIG_MTD_DATAFLASH_OTP=yCONFIG_MTD_M25P80=m
# CONFIG_M25PXX_USE_FAST_READ is not set CONFIG_MTD_SST25L=mCONFIG_MTD_SLRAM=mCONFIG_MTD_PHRAM=mCONFIG_MTD_MTDRAM=mCONFIG_MTD_BLOCK2MTD=mCONFIG_MTD_DOC2000=mCONFIG_MTD_DOC2001=mCONFIG_MTD_DOC2001PLUS=mCONFIG_MTD_DOCG3=m CONFIG_MTD_DOCPROBE_ADVANCED=y CONFIG_MTD_NAND_ECC_SMC=yCONFIG_MTD_NAND=mCONFIG_MTD_NAND_MUSEUM_IDS=y CONFIG_MTD_NAND_GPIO=m CONFIG_MTD_NAND_DISKONCHIP=m CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=y CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y CONFIG_MTD_NAND_DOCG4=m CONFIG_MTD_NAND_SLC_LPC32XX=m CONFIG_MTD_NAND_MLC_LPC32XX=m CONFIG_MTD_NAND_NANDSIM=m CONFIG_MTD_NAND_PLATFORM=mCONFIG_MTD_ALAUDA=mCONFIG_MTD_ONENAND=m CONFIG_MTD_ONENAND_VERIFY_WRITE=y CONFIG_MTD_ONENAND_GENERIC=m CONFIG_MTD_ONENAND_OTP=y CONFIG_MTD_ONENAND_2X_PROGRAM=y CONFIG_MTD_ONENAND_SIM=mCONFIG_MTD_LPDDR=mCONFIG_MTD_UBI=mCONFIG_MTD_UBI_GLUEBI=mCONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_CRYPTOLOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=1 CONFIG_BLK_DEV_RAM_SIZE=16384 CONFIG_EEPROM_AT25=yCONFIG_SCSI=yCONFIG_BLK_DEV_SD=yCONFIG_NETDEVICES=yCONFIG_MII=y
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_CHELSIO is not set
# CONFIG_NET_VENDOR_CIRRUS is not set
# CONFIG_NET_VENDOR_FARADAY is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_NATSEMI is not set CONFIG_LPC_ENET=y
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_STMICRO is not set CONFIG_SMSC_PHY=y
# CONFIG_WLAN is not set
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_LPC32XX=y
# CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_HW_RANDOM is not setCONFIG_I2C=yCONFIG_I2C_CHARDEV=yCONFIG_I2C_PNX=yCONFIG_SPI=yCONFIG_SPI_PL022=yCONFIG_GPIO_SYSFS=y
# CONFIG_HWMON is not setCONFIG_WATCHDOG=yCONFIG_PNX4008_WATCHDOG=yCONFIG_FB=yCONFIG_FB_ARMCLCD=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_SOUND=yCONFIG_SND=yCONFIG_SND_SEQUENCER=yCONFIG_SND_MIXER_OSS=yCONFIG_SND_PCM_OSS=y CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_SUPPORT_OLD_API is not set
# CONFIG_SND_VERBOSE_PROCFS is not set CONFIG_SND_DEBUG=yCONFIG_SND_DEBUG_VERBOSE=y
# CONFIG_SND_DRIVERS is not set
# CONFIG_SND_ARM is not set
# CONFIG_SND_SPI is not setCONFIG_SND_SOC=y
# CONFIG_HID_SUPPORT is not setCONFIG_USB=yCONFIG_USB_OHCI_HCD=yCONFIG_USB_STORAGE=yCONFIG_USB_GADGET=yCONFIG_USB_LPC32XX=yCONFIG_USB_MASS_STORAGE=m CONFIG_USB_G_SERIAL=mCONFIG_MMC=y
# CONFIG_MMC_BLOCK_BOUNCE is not set CONFIG_MMC_ARMMMCI=yCONFIG_NEW_LEDS=yCONFIG_LEDS_CLASS=yCONFIG_LEDS_GPIO=yCONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_BACKLIGHT=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_RTC_CLASS=y CONFIG_RTC_INTF_DEV_UIE_EMUL=y CONFIG_RTC_DRV_DS1374=y CONFIG_RTC_DRV_PCF8563=y CONFIG_RTC_DRV_LPC32XX=yCONFIG_DMADEVICES=yCONFIG_AMBA_PL08X=yCONFIG_STAGING=yCONFIG_LPC32XX_ADC=yCONFIG_IIO=yCONFIG_EXT2_FS=yCONFIG_AUTOFS4_FS=yCONFIG_MSDOS_FS=yCONFIG_VFAT_FS=yCONFIG_TMPFS=yCONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_WBUF_VERIFY=y CONFIG_JFFS2_FS_XATTR=y
# CONFIG_JFFS2_FS_POSIX_ACL is not set
# CONFIG_JFFS2_FS_SECURITY is not set CONFIG_UBIFS_FS=m CONFIG_UBIFS_FS_ADVANCED_COMPR=y
# CONFIG_UBIFS_FS_LZO is not set
# CONFIG_UBIFS_FS_ZLIB is not set CONFIG_LOGFS=yCONFIG_NFS_FS=yCONFIG_ROOT_NFS=yCONFIG_NLS_CODEPAGE_437=yCONFIG_NLS_ASCII=yCONFIG_NLS_ISO8859_1=yCONFIG_NLS_UTF8=y
# CONFIG_SCHED_DEBUG is not set
# CONFIG_DEBUG_PREEMPT is not set CONFIG_DEBUG_INFO=y
# CONFIG_FTRACE is not set
# CONFIG_ARM_UNWIND is not set CONFIG_DEBUG_LL=yCONFIG_EARLY_PRINTK=y CONFIG_CRYPTO_ANSI_CPRNG=y
# CONFIG_CRYPTO_HW is not set CONFIG_CRC_CCITT=y
Re: [PATCH 1/2] mtd: lpc32xx_slc: Adjust to pl08x DMA interface changes
Hi,
Quoted 5 lines · Artem Bityutskiy
Quoted 4 lines · Roland Stigge
This patch adjusts the LPC32xx SLC NAND driver to the new pl08x DMA interface, fixing the compile error resulting from changed pl08x structures.
Quoted 8 lines
Quoted 1 line
Signed-off-by Roland Stigge <[email protected]>This patch breaks compilation:
ERROR: "
pl08x_filter_id" [drivers/mtd/nand/lpc32xx_slc.ko] undefined!Please, send a fix. The defconfig I used is attached.
Thanks for the note. The issue happens on compiling lpc32xx_slc and lpc32xx_mlc as a module. Caused by pl08x_filter_id not being exported. Looking at other dma drivers, they have an EXPORT_SYMBOL() for this, see also
drivers/dma/coh901318.cdrivers/dma/sirf-dma.c
Will post a respective adjustment for drivers/dma/amba-pl08x.c separately.
Roland
Re: [PATCH 1/2] mtd: lpc32xx_slc: Adjust to pl08x DMA interface changes
In reply to Artem BityutskiyHi,
Quoted 5 lines · Artem Bityutskiy
Quoted 4 lines · Roland Stigge
This patch adjusts the LPC32xx SLC NAND driver to the new pl08x DMA interface, fixing the compile error resulting from changed pl08x structures.
Quoted 8 lines
Quoted 1 line
Signed-off-by Roland Stigge <[email protected]>This patch breaks compilation:
ERROR: "
pl08x_filter_id" [drivers/mtd/nand/lpc32xx_slc.ko] undefined!Please, send a fix. The defconfig I used is attached.
Please see my just posted patches:
mtd: lpc32xx_slc: Make driver independent of AMBA DMA engine driver
mtd: lpc32xx_mlc: Make driver independent of AMBA DMA engine driver
This also fixes the above problem by getting rid of the reference to pl08x_filter_id.
Thanks,
Roland
PATCH 2/2 mtd: lpc32xx_mlc: Adjust to pl08x DMA interface changes
In reply to Roland StiggeThis patch adjusts the LPC32xx MLC NAND driver to the new pl08x DMA interface, fixing the compile error resulting from changed pl08x structures.
---
Applies to today's linux-next (integrated lpc32xx-next and dma branches which collide)
drivers/mtd/nand/lpc32xx_mlc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/mtd/nand/lpc32xx_mlc.c +1 -12
@@ -576,17 +576,6 @@ static void lpc32xx_ecc_enable(struct mtd_info *mtd, int mode)/* Always enabled! */ } -static bool lpc32xx_dma_filter (struct dma_chan *chan,void *param) -{ -struct pl08x_dma_chan *ch = - container_of(chan, struct pl08x_dma_chan, chan); - -/* In LPC32xx's PL080 DMA wiring, the MLC NAND DMA signal is #12 */ -if (ch->cd->min_signal ==12 ) -return true; -return false; -} -static int lpc32xx_dma_setup (struct lpc32xx_nand_host *host) {struct mtd_info *mtd = &host->mtd;
@@ -594,7 +583,7 @@ static int lpc32xx_dma_setup(struct lpc32xx_nand_host *host)dma_cap_zero (mask);dma_cap_set (DMA_SLAVE , mask); - host->dma_chan =dma_request_channel (mask, lpc32xx_dma_filter,NULL ); + host->dma_chan =dma_request_channel (mask, pl08x_filter_id,"nand-mlc" );if (!host->dma_chan) {dev_err (mtd->dev.parent,"Failed to request DMA channel\n" );return -EBUSY ;
Signature · 1 line
1.7.10.4
Re: [PATCH 2/2] mtd: lpc32xx_mlc: Adjust to pl08x DMA interface changes
Quoted 4 lines · Roland Stigge
This patch adjusts the LPC32xx MLC NAND driver to the new pl08x DMA interface, fixing the compile error resulting from changed pl08x structures.
Signed-off-by Roland Stigge <[email protected]>
Quoted 41 lines
---
Applies to today's linux-next (integrated lpc32xx-next and dma branches which collide)
drivers/mtd/nand/lpc32xx_mlc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)drivers/mtd/nand/lpc32xx_mlc.c +1
-13@@ -576,17 +576,6 @@ static void lpc32xx_ecc_enable(struct mtd_info *mtd, int mode)/* Always enabled! */ } -static bool lpc32xx_dma_filter (struct dma_chan *chan,void *param) -{ -struct pl08x_dma_chan *ch = - container_of(chan, struct pl08x_dma_chan, chan); - -/* In LPC32xx's PL080 DMA wiring, the MLC NAND DMA signal is #12 */ -if (ch->cd->min_signal ==12 ) -return true; -return false; -} -static int lpc32xx_dma_setup (struct lpc32xx_nand_host *host) {struct mtd_info *mtd = &host->mtd;@@ -594,7 +583,7 @@ static int lpc32xx_dma_setup(struct lpc32xx_nand_host *host)dma_cap_zero (mask);dma_cap_set (DMA_SLAVE , mask); - host->dma_chan =dma_request_channel (mask, lpc32xx_dma_filter,NULL ); + host->dma_chan =dma_request_channel (mask, pl08x_filter_id,"nand-mlc" );if (!host->dma_chan) {dev_err (mtd->dev.parent,"Failed to request DMA channel\n" );return -EBUSY ; --1.7.10.4
Quoted 4 lines · Roland Stigge
This patch adjusts the LPC32xx platform support to the new pl08x DMA interface, fixing the compile error resulting from changed pl08x structures.
Signed-off-by Roland Stigge <[email protected]>
Quoted 31 lines
---
Applies to today's linux-next (integrated lpc32xx-next and dma branches which collide)
arch/arm/mach-lpc32xx/phy3250.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)arch/arm/mach-lpc32xx/phy3250.c +3
-5@@ -186,13 +186,12 @@ static struct pl08x_channel_data pl08x_slave_channels[] = { }, }; -/* NOTE: These will change, according to RMK */ -static int pl08x_get_signal (struct pl08x_dma_chan *ch) +static int pl08x_get_signal (const struct pl08x_channel_data *cd) { -return ch->cd->min_signal; +return cd->min_signal; } -static void pl08x_put_signal (struct pl08x_dma_chan *ch) +static void pl08x_put_signal (const struct pl08x_channel_data *cd,int ch) { } --1.7.10.4